{
  "$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/58fc0170-0877-4ea8-a9ff-d805e361cfae')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/58fc0170-0877-4ea8-a9ff-d805e361cfae')]",
      "properties": {
        "alertRuleTemplateName": "58fc0170-0877-4ea8-a9ff-d805e361cfae",
        "customDetails": null,
        "description": "'The alert shows users that join a Zoom meeting from a time zone other than the one the meeting was created in.\nYou can also whitelist known good time zones in the tz_whitelist value using the tz database name format https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'\n",
        "displayName": "User joining Zoom meeting from suspicious timezone",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "JoiningUser",
                "identifier": "FullName"
              },
              {
                "columnName": "AccountName",
                "identifier": "Name"
              },
              {
                "columnName": "AccountUPNSuffix",
                "identifier": "UPNSuffix"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/ZoomLogs/JoiningMeetingFromAnotherTimeZone.yaml",
        "query": "let schedule_lookback = 14d;\nlet join_lookback = 1d;\n// If you want to whitelist specific timezones include them in a list here\nlet tz_whitelist = dynamic([]);\nlet meetings = (\nZoomLogs\n| where TimeGenerated >= ago(schedule_lookback)\n| where Event =~ \"meeting.created\"\n| extend MeetingId = tostring(parse_json(MeetingEvents).MeetingId)\n| extend SchedTimezone = tostring(parse_json(MeetingEvents).Timezone));\nZoomLogs\n| where TimeGenerated >= ago(join_lookback)\n| where Event =~ \"meeting.participant_joined\"\n| extend JoinedTimeZone = tostring(parse_json(MeetingEvents).Timezone)\n| extend MeetingName = tostring(parse_json(MeetingEvents).MeetingName)\n| extend MeetingId = tostring(parse_json(MeetingEvents).MeetingId)\n| where JoinedTimeZone !in (tz_whitelist)\n| join (meetings) on MeetingId\n| where SchedTimezone != JoinedTimeZone\n| project TimeGenerated, MeetingName, JoiningUser=payload_object_participant_user_name_s, JoinedTimeZone, SchedTimezone, MeetingScheduler=User1\n| extend AccountName = tostring(split(JoiningUser, \"@\")[0]), AccountUPNSuffix = tostring(split(JoiningUser, \"@\")[1])\n",
        "queryFrequency": "P1D",
        "queryPeriod": "P14D",
        "severity": "Low",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.4",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
