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.
- 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 EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
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.
Reporting behind it
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
title: "Azure Sign-in Logs: OAuth Device Code Flow Usage Detected"
id: 837c6264-6610-49da-a547-fd2dd7d62abf
status: test
description: 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.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-applications#application-authentication-flows
- https://github.com/SigmaHQ/sigma/blob/master/rules/cloud/azure/signin_logs/azure_app_device_code_authentication.yml
author: Mark Morowczynski '@markmorow', Bailey Bercik '@baileybercik', Huntrule Team
date: 2022-06-01
tags:
- attack.stealth
- attack.t1078
- attack.persistence
- attack.privilege-escalation
- attack.initial-access
logsource:
product: azure
service: signinlogs
detection:
selection:
properties.message: Device Code
condition: selection
falsepositives:
- Applications that are input constrained will need to use device code flow and are valid authentications.
level: medium
license: DRL-1.1
related:
- id: 248649b7-d64f-46f0-9fb2-a52774166fb5
type: derived