Check ID:
Provider: Microsoft 365
Service:
Severity: HIGH
Categories:
Resource type:
entra_conditional_access_policy_device_code_flow_blockedProvider: Microsoft 365
Service:
entraSeverity: HIGH
Categories:
identity-access, trust-boundaries, e3Resource type:
NotDefinedWhat this check verifies
Conditional Access policies restrict the device code authentication flow, which is commonly abused in phishing campaigns to hijack user sessions. A policy targetingdeviceCodeFlow in authentication flow conditions with a block grant control prevents this attack vector.
Risk
Device code flow is heavily exploited in phishing attacks such as Storm-2372, where attackers trick users into entering device codes on legitimate Microsoft login pages. Without a blocking policy, attackers can obtain tokens and gain persistent access to organizational resources.Recommendation
Block device code flow via Conditional Access to mitigate phishing attacks that abuse this authentication method. Exclude only break-glass accounts and legitimate service accounts that require device code flow. Regularly review exceptions to minimize the attack surface.Remediation
Dashboard steps- Navigate to the Microsoft Entra admin center at https://entra.microsoft.com.
- Expand Protection > Conditional Access and select Policies.
- Click New policy.
- Under Users, include All users and exclude break-glass accounts.
- Under Target resources, include All cloud apps.
- Under Conditions > Authentication flows, select Device code flow.
- Under Grant, select Block access.
- Set the policy to On and click Create.
References
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-conditions#authentication-flows
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-authentication-flows
Where this check fires
This check runs on every scheduled scan against your Microsoft 365 account. Findings appear at Cloud Security → Findings filterable byCheck ID = entra_conditional_access_policy_device_code_flow_blocked. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Microsoft 365 checks