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
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