Entra ID Unusual Cloud Device Registration
Detects a sequence of Microsoft Entra ID audit events indicative of cloud device registration using the default device profile of ROADtools (roadtx). The sequence begins with an "Add device" operation from the Device Registration Service where the user agent is "Microsoft.OData.Client/*", the recorded cloud device OS build is a ROADtools default ("10.0.19041.928" or "10.0.19045.2006") and the display name follows the default "DESKTOP-" pattern, followed within the same correlation ID by "Add registered users to device" or "Add registered owner to device", which completes the registration and binds the device to a user. This flow is used to establish persistence or acquire a Primary Refresh Token (PRT). The OS build and naming are tool defaults, so this is a high-fidelity but evadable indicator.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/06/13"
3integration = ["azure"]
4maturity = "production"
5updated_date = "2026/11/16"
6
7[rule]
8author = ["Elastic"]
9description = """
10Detects a sequence of Microsoft Entra ID audit events indicative of cloud device registration using the default device
11profile of ROADtools (roadtx). The sequence begins with an "Add device" operation from the Device Registration Service
12where the user agent is "Microsoft.OData.Client/*", the recorded cloud device OS build is a ROADtools default
13("10.0.19041.928" or "10.0.19045.2006") and the display name follows the default "DESKTOP-" pattern, followed within the
14same correlation ID by "Add registered users to device" or "Add registered owner to device", which completes the
15registration and binds the device to a user. This flow is used to establish persistence or acquire a Primary Refresh
16Token (PRT). The OS build and naming are tool defaults, so this is a high-fidelity but evadable indicator.
17"""
18from = "now-30m"
19index = ["filebeat-*", "logs-azure.auditlogs-*"]
20interval = "15m"
21language = "eql"
22license = "Elastic License v2"
23name = "Entra ID Unusual Cloud Device Registration"
24note = """## Triage and analysis
25
26### Investigating Entra ID Unusual Cloud Device Registration
27
28This rule detects a sequence of Microsoft Entra ID audit events, correlated by `azure.correlation_id`, consistent with a device registered using the ROADtools (roadtx) default profile:
29
301. An `Add device` operation from the Device Registration Service where the user agent is `Microsoft.OData.Client/*`, `CloudDeviceOSVersion` is `10.0.19041.928` or `10.0.19045.2006` (ROADtools default builds) and `CloudDisplayName` matches `DESKTOP-*`.
312. An `Add registered users to device` or `Add registered owner to device` operation, which binds the new device to a user. Either one satisfies the sequence, as their order is not stable.
32
33Rogue device registration is typically a precursor to PRT acquisition, MFA/Conditional Access bypass, and persistent token-based access.
34
35### Possible investigation steps
36
37- Identify the user principal associated with the device registration.
38- Review the `azure.auditlogs.identity` field to confirm the Device Registration Service initiated the request.
39- Check the user-agent in `azure.auditlogs.properties.additional_details.value`. This rule requires `Microsoft.OData.Client/*` (the roadtx Graph/OData client); native Windows joins present `Dsreg/*` instead.
40- Confirm `CloudDeviceOSVersion` (`modified_properties.3`) and `CloudDisplayName` (`modified_properties.4`) on the `Add device` event, and compare the device name to your naming convention.
41- Use `azure.correlation_id` to pivot across all three steps of the registration flow.
42- Pivot to `azure.signinlogs` to detect follow-on activity using the new device, such as sign-ins involving refresh or primary refresh tokens.
43- Look for signs of persistence or lateral movement enabled by the newly registered device.
44- Identify the registered device name by reviewing `azure.auditlogs.properties.target_resources.0.display_name` and confirm it's expected for the user or organization.
45- Use the correlation ID `azure.correlation_id` to pivot into registered user events from Entra ID audit logs and check `azure.auditlogs.properties.target_resources.0.user_principal_name` to identify the user associated with the device registration.
46- Review any activity for this user from Entra ID sign-in logs, where the incoming token type is a `primaryRefreshToken`.
47
48### False positive analysis
49
50- Some MDM, autopilot provisioning flows, or third-party device management tools may generate similar sequences. Validate against known provisioning tools, expected rollout windows, and device inventory.
51- Investigate whether the device name, OS version, and registration details align with normal IT workflows.
52- Authorized red team activity using ROADtools will match; scope exceptions to the user, source IP, or device name.
53- Check if the user-agent corresponds to legitimate automation or tooling used by your organization.
54
55### Response and remediation
56
57- If confirmed malicious, remove the registered device from Entra ID.
58- Revoke refresh tokens and primary refresh tokens associated with the user and device.
59- Disable the user account and initiate password reset and identity verification procedures.
60- Review audit logs and sign-in activity for additional indicators of persistence or access from the rogue device.
61- Tighten conditional access policies to restrict device registration and enforce compliance or hybrid join requirements.
62"""
63references = [
64 "https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/",
65 "https://github.com/dirkjanm/ROADtools",
66 "https://dirkjanm.io/introducing-roadtools-token-exchange-roadtx/",
67]
68risk_score = 47
69rule_id = "90efea04-5675-11f0-8f80-f661ea17fbcd"
70severity = "medium"
71tags = [
72 "Domain: Cloud",
73 "Domain: Identity",
74 "Data Source: Azure",
75 "Data Source: Microsoft Entra ID",
76 "Data Source: Microsoft Entra ID Audit Logs",
77 "Use Case: Identity and Access Audit",
78 "Tactic: Persistence",
79 "Resources: Investigation Guide",
80 "Noise: Low",
81 "Performance: Fast",
82 "Rule Type: Event Correlation (EQL)",
83 "Platform: Entra ID",
84]
85timestamp_override = "event.ingested"
86type = "eql"
87
88query = '''
89sequence by azure.correlation_id with maxspan=30s
90[any where data_stream.dataset == "azure.auditlogs" and
91 azure.auditlogs.identity == "Device Registration Service" and
92 event.action == "Add device" and
93 azure.auditlogs.properties.additional_details.value like "Microsoft.OData.Client/*" and
94 (
95 `azure.auditlogs.properties.target_resources.0.modified_properties.3.new_value` like "*10.0.19041.928*" or
96 `azure.auditlogs.properties.target_resources.0.modified_properties.3.new_value` like "*10.0.19045.2006*"
97 ) and
98 `azure.auditlogs.properties.target_resources.0.modified_properties.4.new_value` like "*DESKTOP-*"]
99[any where data_stream.dataset == "azure.auditlogs" and
100 event.action in ("Add registered users to device", "Add registered owner to device")]
101'''
102
103
104[[rule.threat]]
105framework = "MITRE ATT&CK"
106[[rule.threat.technique]]
107id = "T1098"
108name = "Account Manipulation"
109reference = "https://attack.mitre.org/techniques/T1098/"
110[[rule.threat.technique.subtechnique]]
111id = "T1098.005"
112name = "Device Registration"
113reference = "https://attack.mitre.org/techniques/T1098/005/"
114
115
116
117[rule.threat.tactic]
118id = "TA0003"
119name = "Persistence"
120reference = "https://attack.mitre.org/tactics/TA0003/"
121[[rule.threat]]
122framework = "MITRE ATT&CK"
123[[rule.threat.technique]]
124id = "T1098"
125name = "Account Manipulation"
126reference = "https://attack.mitre.org/techniques/T1098/"
127[[rule.threat.technique.subtechnique]]
128id = "T1098.005"
129name = "Device Registration"
130reference = "https://attack.mitre.org/techniques/T1098/005/"
131
132
133
134[rule.threat.tactic]
135id = "TA0004"
136name = "Privilege Escalation"
137reference = "https://attack.mitre.org/tactics/TA0004/"
138
139
140[rule.investigation_fields]
141field_names = [
142 "@timestamp",
143 "event.action",
144 "event.outcome",
145 "azure.auditlogs.identity",
146 "azure.auditlogs.properties.target_resources.0.id",
147 "azure.auditlogs.properties.target_resources.0.display_name",
148 "azure.auditlogs.properties.target_resources.0.user_principal_name",
149 "azure.auditlogs.properties.target_resources.0.modified_properties.3.new_value",
150 "azure.auditlogs.properties.target_resources.0.modified_properties.4.new_value",
151 "azure.auditlogs.properties.initiated_by.app.displayName",
152 "azure.auditlogs.properties.additional_details.value",
153 "azure.tenant_id",
154 "azure.correlation_id",
155]
Triage and analysis
Investigating Entra ID Unusual Cloud Device Registration
This rule detects a sequence of Microsoft Entra ID audit events, correlated by azure.correlation_id, consistent with a device registered using the ROADtools (roadtx) default profile:
- An
Add deviceoperation from the Device Registration Service where the user agent isMicrosoft.OData.Client/*,CloudDeviceOSVersionis10.0.19041.928or10.0.19045.2006(ROADtools default builds) andCloudDisplayNamematchesDESKTOP-*. - An
Add registered users to deviceorAdd registered owner to deviceoperation, which binds the new device to a user. Either one satisfies the sequence, as their order is not stable.
Rogue device registration is typically a precursor to PRT acquisition, MFA/Conditional Access bypass, and persistent token-based access.
Possible investigation steps
- Identify the user principal associated with the device registration.
- Review the
azure.auditlogs.identityfield to confirm the Device Registration Service initiated the request. - Check the user-agent in
azure.auditlogs.properties.additional_details.value. This rule requiresMicrosoft.OData.Client/*(the roadtx Graph/OData client); native Windows joins presentDsreg/*instead. - Confirm
CloudDeviceOSVersion(modified_properties.3) andCloudDisplayName(modified_properties.4) on theAdd deviceevent, and compare the device name to your naming convention. - Use
azure.correlation_idto pivot across all three steps of the registration flow. - Pivot to
azure.signinlogsto detect follow-on activity using the new device, such as sign-ins involving refresh or primary refresh tokens. - Look for signs of persistence or lateral movement enabled by the newly registered device.
- Identify the registered device name by reviewing
azure.auditlogs.properties.target_resources.0.display_nameand confirm it's expected for the user or organization. - Use the correlation ID
azure.correlation_idto pivot into registered user events from Entra ID audit logs and checkazure.auditlogs.properties.target_resources.0.user_principal_nameto identify the user associated with the device registration. - Review any activity for this user from Entra ID sign-in logs, where the incoming token type is a
primaryRefreshToken.
False positive analysis
- Some MDM, autopilot provisioning flows, or third-party device management tools may generate similar sequences. Validate against known provisioning tools, expected rollout windows, and device inventory.
- Investigate whether the device name, OS version, and registration details align with normal IT workflows.
- Authorized red team activity using ROADtools will match; scope exceptions to the user, source IP, or device name.
- Check if the user-agent corresponds to legitimate automation or tooling used by your organization.
Response and remediation
- If confirmed malicious, remove the registered device from Entra ID.
- Revoke refresh tokens and primary refresh tokens associated with the user and device.
- Disable the user account and initiate password reset and identity verification procedures.
- Review audit logs and sign-in activity for additional indicators of persistence or access from the rogue device.
- Tighten conditional access policies to restrict device registration and enforce compliance or hybrid join requirements.
References
Related rules
- Entra ID Protection User Alert and Device Registration
- Entra ID Service Principal Credentials Created by Unusual User
- Entra ID Conditional Access Policy (CAP) Modified
- Entra ID Global Administrator Role Assigned
- Entra ID AiTM Phishing-Kit Chain Detected