Unusual City for an Azure Activity Logs Event
A machine learning job detected Azure Activity Logs activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (city) that is unusual for the event action. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/10/06"
3integration = ["azure"]
4maturity = "production"
5min_stack_comments = "New job added"
6min_stack_version = "9.3.0"
7updated_date = "2025/11/21"
8
9[rule]
10anomaly_threshold = 50
11author = ["Elastic"]
12description = """
13A machine learning job detected Azure Activity Logs activity that, while not inherently suspicious or abnormal, is sourcing from
14a geolocation (city) that is unusual for the event action. This can be the result of compromised credentials or keys being
15used by a threat actor in a different geography than the authorized user(s).
16"""
17false_positives = [
18 """
19 New or unusual event and user geolocation activity can be due to manual troubleshooting or reconfiguration;
20 changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased
21 adoption of work from home policies; or users who travel frequently.
22 """,
23]
24from = "now-2h"
25interval = "15m"
26license = "Elastic License v2"
27machine_learning_job_id = "azure_activitylogs_rare_event_action_for_a_city"
28name = "Unusual City for an Azure Activity Logs Event"
29setup = """## Setup
30
31This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
32
33### Anomaly Detection Setup
34
35Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
36
37### Azure Activity Logs Integration Setup
38The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
39
40#### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
41- Go to the Kibana home page and click “Add integrations”.
42- In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
43- Click “Add Azure Activity Logs”.
44- Configure the integration.
45- Click “Save and Continue”.
46- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
47"""
48references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
49risk_score = 21
50rule_id = "ce08cdb8-e6cb-46bb-a7cc-16d17547323f"
51severity = "low"
52tags = [
53 "Domain: Cloud",
54 "Data Source: Azure",
55 "Data Source: Azure Activity Logs",
56 "Rule Type: ML",
57 "Rule Type: Machine Learning",
58]
59type = "machine_learning"
60
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63
64[rule.threat.tactic]
65id = "TA0001"
66name = "Initial Access"
67reference = "https://attack.mitre.org/tactics/TA0001/"
68
69[[rule.threat.technique]]
70id = "T1078"
71name = "Valid Accounts"
72reference = "https://attack.mitre.org/techniques/T1078/"
73
74[[rule.threat.technique.subtechnique]]
75id = "T1078.004"
76name = "Cloud Accounts"
77reference = "https://attack.mitre.org/techniques/T1078/004/"
References
Related rules
- Rare Azure Activity Logs Event Failures
- Spike in Azure Activity Logs Failed Messages
- Unusual Azure Activity Logs Event for a User
- Unusual Country for an Azure Activity Logs Event
- Rare GCP Audit Failure Event Code