Entra ID OAuth Device Code Grant by Unusual User
Identifies when a user is observed for the first time authenticating using the device code authentication workflow. This authentication workflow can be abused by attackers to phish users and steal access tokens to…
Description
Identifies when a user is observed for the first time authenticating using the device code authentication workflow. This authentication workflow can be abused by attackers to phish users and steal access tokens to impersonate the victim. By its very nature, device code should only be used when logging in to devices without keyboards, where it is difficult to enter emails and passwords. This rule only applies to Entra ID user types and detects new users leveraging this flow.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source category
- event_index
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| aadinternals.com/post/phishing/ | 2 |
| learn.microsoft.com/en-us/entra/identity/conditional-access/concept-authentication-flows | 2 |
| www.blackhillsinfosec.com/dynamic-device-code-phishing/ | Only this detection cites it |
| www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/ | 4 |
| www.volexity.com/blog/2025/02/13/multiple-russian-threat-actors-targeting-microsoft-device-code-authentication/ | 5 |
From the source
- At source
- Open at source
- Upstream identifier
- af22d970-7106-45b4-b5e3-460d15333727
- Tagged by the source as
- Data Source: AzureData Source: Azure Activity LogsData Source: Microsoft Entra IDData Source: Microsoft Entra ID Sign-in LogsDomain: CloudDomain: IdentityNoise: LowPerformance: FastPlatform: AzurePlatform: Entra IDProfile: RecommendedResources: Investigation GuideRule Type: New TermsTactic: Initial AccessThreat: Device Code PhishingUse Case: Identity and Access Audit
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3