{
  "$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/7034abc9-6b66-4533-9bf3-056672fd9d9e')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/7034abc9-6b66-4533-9bf3-056672fd9d9e')]",
      "properties": {
        "alertRuleTemplateName": "7034abc9-6b66-4533-9bf3-056672fd9d9e",
        "customDetails": {
          "Action": "Action_s",
          "CustomName": "CustomName_s",
          "CustomThreatDict": "CustomThreatDictionary_s",
          "Definition": "Definition_s",
          "Hits": "Hits_s",
          "InternalName": "InternalName_s",
          "MsgId_s": "MsgId_s",
          "NewDomain": "NewDomain_s",
          "ReplyMismatch": "ReplyMismatch_s",
          "Route": "Route_s",
          "SimilarCustExtDomain": "SimilarCustomExternalDomain_s",
          "SimilarIntDomain": "SimilarInternalDomain_s",
          "SimilarMCExtDomain": "SimilarMimecastExternalDomain_s",
          "Subject": "Subject_s",
          "TaggedExternal": "TaggedExternal_s",
          "TaggedMalicious": "TaggedMalicious_s",
          "ThreatDictionary": "ThreatDictionary_s"
        },
        "description": "Detects threats from impersonation mail under targeted threat protection",
        "displayName": "Mimecast Secure Email Gateway - Impersonation Protect",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "MailMessage",
            "fieldMappings": [
              {
                "columnName": "Sender_s",
                "identifier": "Sender"
              },
              {
                "columnName": "IP_s",
                "identifier": "SenderIP"
              },
              {
                "columnName": "Recipient_s",
                "identifier": "Recipient"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "SingleAlert"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "lookbackDuration": "P1D",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/MimecastSEG/Analytic%20Rules/MimecastSIEM_Impersonation.yaml",
        "query": "MimecastSIEM_CL| where mimecastEventId_s == \"mail_ttp_impersonation\"",
        "queryFrequency": "PT5M",
        "queryPeriod": "PT15M",
        "severity": "High",
        "subTechniques": [],
        "suppressionDuration": "PT5H",
        "suppressionEnabled": false,
        "tactics": [
          "Collection",
          "Discovery",
          "LateralMovement"
        ],
        "techniques": [
          "T1114"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
