{
  "$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/65bc5f1d-d29d-4729-a5a6-d9614b0900e0')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/65bc5f1d-d29d-4729-a5a6-d9614b0900e0')]",
      "properties": {
        "alertRuleTemplateName": "65bc5f1d-d29d-4729-a5a6-d9614b0900e0",
        "customDetails": null,
        "description": "An administrator logged into the Cybereinforce console.\n",
        "displayName": "CTE - Admin Login Detected",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountName",
                "identifier": "Name"
              },
              {
                "columnName": "UPNSuffix",
                "identifier": "UPNSuffix"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cybereinforce/Analytic%20Rules/AdminLoginDetected.yaml",
        "query": "CybereinforceCTE_CL\n| where EventType == \"auth.login\"\n| extend AccountName = tostring(split(Actor, \"@\")[0]), UPNSuffix = tostring(split(Actor, \"@\")[1])\n| project TimeGenerated, TenantId, Actor, AccountName, UPNSuffix, Severity, Category, Source\n",
        "queryFrequency": "PT30M",
        "queryPeriod": "PT30M",
        "severity": "Informational",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
