-
Entra ID OAuth Device Code Flow with Concurrent Sign-ins
Sep 19, 2026 · Domain: Cloud Domain: Identity Data Source: Azure Data Source: Entra ID Data Source: Entra ID Sign-In Use Case: Identity and Access Audit Use Case: Threat Detection Tactic: Credential Access Resources: Investigation Guide Noise: Medium Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: ES|QL Platform: Entra ID ·Identifies Entra ID device code authentication flows where multiple user agents are observed within the same session. This pattern is indicative of device code phishing, where an attacker's polling client (e.g., Python script) and the victim's browser both appear in the same authentication session. In legitimate device code flows, the user authenticates via browser while the requesting application polls for tokens - when these have distinctly different user agents (e.g., Python Requests vs Chrome), it may indicate the code was phished and redeemed by an attacker.
Read More -
Entra ID OAuth Device Code Grant by Microsoft Authentication Broker
Sep 19, 2026 · Domain: Cloud Data Source: Azure Data Source: Microsoft Entra ID Use Case: Identity and Access Audit Tactic: Initial Access Resources: Investigation Guide Noise: Low Performance: Fast Profile: Recommended Threat: Device Code Phishing Rule Type: Custom Query (KQL) Platform: Entra ID Platform: Azure Domain: Identity Data Source: Azure Activity Logs ·Identifies device code authentication with an Azure broker client for Entra ID. Adversaries abuse Primary Refresh Tokens (PRTs) to bypass multi-factor authentication (MFA) and gain unauthorized access to Azure resources. PRTs are used in Conditional Access policies to enforce device-based controls. Compromising PRTs allows attackers to bypass these policies and gain unauthorized access. This rule detects successful sign-ins using device code authentication with the Entra ID broker client application ID (29d9ed98-a469-4536-ade2-f981bc1d605e).
Read More -
Entra ID OAuth Device Code Grant by Unusual User
Sep 19, 2026 · Domain: Cloud Domain: Identity Data Source: Azure Data Source: Microsoft Entra ID Data Source: Microsoft Entra ID Sign-In Logs Use Case: Identity and Access Audit Tactic: Initial Access Resources: Investigation Guide Noise: Low Performance: Fast Profile: Recommended Threat: Device Code Phishing Rule Type: New Terms Platform: Entra ID Platform: Azure Data Source: Azure Activity Logs ·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.
Read More -
Entra ID OAuth Device Code Phishing via AiTM
Sep 19, 2026 · Domain: Cloud Domain: Identity Data Source: Azure Data Source: Microsoft Entra ID Data Source: Microsoft Entra ID Sign-In Logs Use Case: Threat Detection Threat: Tycoon2FA Tactic: Initial Access Resources: Investigation Guide Noise: Low Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: Custom Query (KQL) Platform: Entra ID ·Detects successful Microsoft Entra ID sign-ins that use the OAuth device code authentication protocol with the Microsoft Authentication Broker client requesting first-party Office API resources (Exchange Online, Microsoft Graph, or SharePoint) while flagged as interactive. This pattern is associated with adversary-in-the-middle (AiTM) phishing kits such as Tycoon 2FA, where victims complete device code flows that ultimately broker tokens for mail and collaboration APIs.
Read More -
Entra ID OAuth Device Code Sign-in to Azure AD Graph Enumeration
Sep 19, 2026 · Domain: Cloud Domain: Identity Data Source: Azure Data Source: Microsoft Entra ID Data Source: Microsoft Entra ID Sign-In Logs Data Source: Azure AD Graph Data Source: Azure AD Graph Activity Logs Use Case: Identity and Access Audit Use Case: Threat Detection Tactic: Credential Access Tactic: Initial Access Tactic: Discovery Resources: Investigation Guide Noise: Unknown Performance: Fast Profile: Recommended Threat: Device Code Phishing Rule Type: Event Correlation (EQL) Platform: Entra ID Platform: Azure ·Correlates a successful Entra ID device-code sign-in to the legacy Azure AD Graph audience (00000002-0000-0000-c000-000000000000) from an unmanaged device with directory enumeration against graph.windows.net by the same user within a short window. Device-code phishing is the dominant OAuth phishing variant against Microsoft tenants: the adversary initiates the flow, relays the user-facing code to the victim, and on redemption walks away with an access or refresh token bound to the targeted resource without ever handling the user's password or MFA factor. When the redeemed audience is AAD Graph and the redeeming device is unmanaged, the follow-on Graph traffic is the compromised cloud account being used by the attacker, not by the user. This rule fires when that token is immediately turned around against the directory under the same identity to read user, group, service principal, application, role assignment, directory object, policy, OAuth permission grant, or tenant detail collections.
Read More -
Entra ID OAuth Flow by Microsoft Authentication Broker to Device Registration Service (DRS)
Sep 19, 2026 · Domain: Cloud Domain: Identity Data Source: Azure Data Source: Entra ID Data Source: Entra ID Sign-In Logs Use Case: Identity and Access Audit Use Case: Threat Detection Resources: Investigation Guide Tactic: Initial Access Noise: Low Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: ES|QL Platform: Entra ID ·Identifies separate OAuth authorization flows in Microsoft Entra ID where the same user principal and session ID are observed across multiple IP addresses within a 5-minute window. These flows involve the Microsoft Authentication Broker (MAB) as the client application and the Device Registration Service (DRS) as the target resource. This pattern is highly indicative of OAuth phishing activity, where an adversary crafts a legitimate Microsoft login URL to trick a user into completing authentication and sharing the resulting authorization code, which is then exchanged for an access and refresh token by the attacker.
Read More -
Entra ID OAuth PRT Issuance to Non-Managed Device Detected
Sep 19, 2026 · Domain: Cloud Domain: Identity Use Case: Threat Detection Data Source: Azure Data Source: Microsoft Entra ID Data Source: Microsoft Entra ID Sign-In Logs Tactic: Persistence Tactic: Initial Access Resources: Investigation Guide Noise: Medium Performance: Fast Profile: Recommended Threat: Device Code Phishing Rule Type: Event Correlation (EQL) Platform: Entra ID ·Identifies when a user signs in with a refresh token using the Microsoft Authentication Broker (MAB) client, followed by a Primary Refresh Token (PRT) sign-in from the same device within 1 hour from an unmanaged device. This pattern may indicate that an attacker has successfully registered a device using ROADtx and transitioned from short-term token access to long-term persistent access via PRTs. Excluding access to the Device Registration Service (DRS) ensures the PRT is being used beyond registration, often to access Microsoft 365 resources like Outlook or SharePoint.
Read More -
M365 Identity Device Code Grant by an Unusual User (Non-Compliant Device)
Sep 19, 2026 · Domain: Cloud Domain: SaaS Domain: Identity Data Source: Microsoft 365 Data Source: Microsoft 365 Audit Logs Use Case: Identity and Access Audit Use Case: Threat Detection Resources: Investigation Guide Tactic: Initial Access Noise: Medium Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: New Terms Platform: Microsoft 365 Domain: Email ·Identifies a Microsoft 365 user completing an OAuth device code grant ("Cmsi:Cmsi") from a non-compliant device for the first time within the rule's historical window, regardless of the requesting application or target resource. Device code phishing kits complete the full login (password and MFA) at the genuine Microsoft endpoint and harvest the resulting token by polling, so MFA does not stop them. Because the victim authorizes the flow in their own browser, the grant is frequently completed on a personal or attacker-controlled device that is not enrolled or compliant with the organization's device policies. A user appearing with this device code flow on a non-compliant device for the first time in the lookback window is a strong early indicator of device code phishing, and removing the application and target constraints catches grants against any first-party application, not just the Microsoft Authentication Broker.
Read More -
M365 Identity Device Code Grant with Unusual User and ASN
Sep 19, 2026 · Domain: Cloud Domain: SaaS Domain: Identity Data Source: Microsoft 365 Data Source: Microsoft 365 Audit Logs Use Case: Identity and Access Audit Use Case: Threat Detection Resources: Investigation Guide Tactic: Initial Access Noise: Low Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: New Terms Platform: Microsoft 365 Domain: Email ·Identifies a Microsoft 365 OAuth device code grant ("Cmsi:Cmsi") with application Microsoft Authentication Broker ("29d9ed98-a469-4536-ade2-f981bc1d605e") for Microsoft Graph from a source ASN not previously observed for that user in a historical window. Phishing kits leveraging device code phishing complete the full login (password and MFA) at the genuine Microsoft endpoint and harvest the resulting token by polling, so MFA does not stop them and the authorization commonly originates from attacker-controlled residential proxy or hosting infrastructure rather than the user's normal network.
Read More -
M365 Identity OAuth Flow by User Sign-in to Device Registration
Sep 19, 2026 · Domain: Cloud Domain: SaaS Data Source: Microsoft 365 Data Source: Microsoft 365 Audit Logs Use Case: Identity and Access Audit Tactic: Credential Access Resources: Investigation Guide Noise: Medium Performance: Normal Profile: Recommended Threat: Device Code Phishing Rule Type: Event Correlation (EQL) Platform: Microsoft 365 Domain: Email ·Identifies attempts to register a new device in Microsoft Entra ID after OAuth authentication with authorization code grant. Adversaries may use OAuth phishing techniques to obtain an OAuth authorization code, which can then be exchanged for access and refresh tokens. This rule detects a sequence of events where a user principal authenticates via OAuth, followed by a device registration event, indicating potential misuse of the OAuth flow to establish persistence or access resources.
Read More