{
  "$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/a97e2333-b7de-4c14-9700-e652a1dbef26')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/a97e2333-b7de-4c14-9700-e652a1dbef26')]",
      "properties": {
        "alertDetailsOverride": null,
        "alertRuleTemplateName": null,
        "apiVersion": "2021-09-01-preview",
        "customDetails": {
          "EmailID": "EmailEmailId"
        },
        "description": "This query searches for phishing emails that are pending action",
        "displayName": "Checkpoint - Pending Phishing emails",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "MailMessage",
            "fieldMappings": [
              {
                "columnName": "EmailFromEmail",
                "identifier": "Sender"
              },
              {
                "columnName": "EmailMessageId",
                "identifier": "NetworkMessageId"
              },
              {
                "columnName": "EmailSubject",
                "identifier": "Subject"
              }
            ]
          },
          {
            "entityType": "Mailbox",
            "fieldMappings": [
              {
                "columnName": "EmailTo",
                "identifier": "MailboxPrimaryAddress"
              }
            ]
          }
        ],
        "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/Checkpoint%20Harmony%20Email%20and%20Collaboration/Analytic%20Rules/CheckpointHECPhishingNotQuarantined.yaml",
        "query": "CheckpointHEC_CL | where EventCurrentState == \"new\" and EventCategory == \"phishing\"",
        "queryFrequency": "PT5M",
        "queryPeriod": "PT15M",
        "severity": "High",
        "subTechniques": [],
        "suppressionDuration": "PT5H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
