{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/8e52bcf1-4f50-4c39-8678-d9efad64e379')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/8e52bcf1-4f50-4c39-8678-d9efad64e379')]",
      "properties": {
        "alertRuleTemplateName": "8e52bcf1-4f50-4c39-8678-d9efad64e379",
        "customDetails": null,
        "description": "Detects threat for data leak when action is hold",
        "displayName": "Mimecast Data Leak Prevention - Hold",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "MailMessage",
            "fieldMappings": [
              {
                "columnName": "SenderAddress",
                "identifier": "Sender"
              },
              {
                "columnName": "RecipientAddress",
                "identifier": "Recipient"
              },
              {
                "columnName": "Action",
                "identifier": "DeliveryAction"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "SingleAlert"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "lookbackDuration": "P7D",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Mimecast/Analytic%20Rules/MimecastSEG/MimecastDLP_hold.yaml",
        "query": "MimecastDLP \n| where Action == \"hold\"\n| extend SenderAddress = ['Sender Address'] ,RecipientAddress = ['Recipient Address']\n",
        "queryFrequency": "PT15M",
        "queryPeriod": "PT15M",
        "severity": "Informational",
        "subTechniques": [],
        "suppressionDuration": "PT5H",
        "suppressionEnabled": false,
        "tactics": [
          "Exfiltration"
        ],
        "techniques": [
          "T1030"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
