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
Suspicious Login Shell Assigned to Service Account games on Linux
Suspicious SSH Daemon Configuration Change Enabling Root Login
Suspicious NTLM Network Logon From Attacker Controlled Workstation Names (via security)
Suspicious dMSA Object Access with Migration AccessMask
Malicious ESX Admins Group Added to Privileged Directory Group
Malicious ESX Admins Group Creation via WinRM Host
Suspicious BrightMetricAgent Remote Tool Execution Associated With Volt Typhoon
Suspicious SmarterMail Force Password Reset API Request Indicating Account Takeover
Suspicious Mailbox Forwarding Rule Creation Following AiTM Phishing
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.