Azure Sign-in Logs: OAuth Device Code Flow Usage Detected

Alerts on Azure sign-in events showing "Device Code" usage by applications outside expected input-constrained device contexts.

FreeReviewedSigma · Medium · v5
Product
azure
Service
signinlogs
Author
Mark Morowczynski '@markmorow', Bailey Bercik '@baileybercik' (SigmaHQ), DRL 1.1
Published
2022-06-01
Updated
2026-07-31

ATT&CK techniques

Initial Access → Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule flags Azure sign-in events where the authentication flow indicates "Device Code." Device code flow is typically expected only for input-constrained devices, so observing it outside that context may indicate a misconfigured application or malicious authentication attempts. It relies on telemetry from Azure sign-in logs that include the message field containing the "Device Code" indicator.

Related detections9 linkedT1078 — drag to rearrange
Possible Next.js Middleware Auth Bypass via X-Middleware-Subrequest Header (CVE-2025-29927)
Suspicious Brutforce with Denied Access Due to Account Restrictions Policies (via security)
Suspicious Success Login Attempt on a Windows OpenSSH Server (via security)
Suspicious SQL Server - Connection Attempt Using a Disabled Account (via application)
Suspicious Lateral Movement Detection - Based on "special Groups" Feature (via security)
Suspicious Snowflake Anomalous Client Application Associated With UNC5537 (via cloud)
Malicious Network Login Performed to Multiple Targets (via security)
Malicious RDP Reconnaissance with Valid Credentials Performed on Multiple Hosts (via security)
Malicious Local Administrator Added by Atera RMM Agent
Azure Sign-in Logs: OAuth Device Code Flow Usage Detected
Pivot detection · T1078 · 9 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.