Block
CA004-Global-IdentityProtection-AnyApp-AnyPlatform-AuthenticationFlows
Block access
About this policy
The CA004-Global-IdentityProtection-AnyApp-AnyPlatform-AuthenticationFlows policy blocks device code flow and authentication transfer for all users across every cloud app. Device code flow is a favourite trick in phishing campaigns, where an attacker persuades someone to enter a code on a legitimate Microsoft page and quietly takes over their session. Very few organisations need these flows day to day, so blocking them removes a well known attack path with barely any user impact.
Policy conditions
JSON template
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/policies/$entity",
"@odata.type": "#microsoft.graph.conditionalAccessPolicy",
"@odata.id": "identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')",
"@odata.editLink": "identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')",
"templateId": null,
"displayName": "CA004-Global-IdentityProtection-AnyApp-AnyPlatform-AuthenticationFlows",
"createdDateTime@odata.type": "#DateTimeOffset",
"modifiedDateTime@odata.type": "#DateTimeOffset",
"state@odata.type": "#microsoft.graph.conditionalAccessPolicyState",
"state": "enabled",
"deletedDateTime": null,
"partialEnablementStrategy": null,
"sessionControls": null,
"conditions": {
"@odata.type": "#microsoft.graph.conditionalAccessConditionSet",
"userRiskLevels@odata.type": "#Collection(microsoft.graph.riskLevel)",
"userRiskLevels": [],
"signInRiskLevels@odata.type": "#Collection(microsoft.graph.riskLevel)",
"signInRiskLevels": [],
"clientAppTypes@odata.type": "#Collection(microsoft.graph.conditionalAccessClientApp)",
"clientAppTypes": [
"all"
],
"platforms": null,
"locations": null,
"times": null,
"deviceStates": null,
"devices": null,
"clientApplications": null,
"agents": null,
"applications": {
"@odata.type": "#microsoft.graph.conditionalAccessApplications",
"includeApplications@odata.type": "#Collection(String)",
"includeApplications": [
"All"
],
"excludeApplications@odata.type": "#Collection(String)",
"excludeApplications": [],
"includeUserActions@odata.type": "#Collection(String)",
"includeUserActions": [],
"includeAuthenticationContextClassReferences@odata.type": "#Collection(String)",
"includeAuthenticationContextClassReferences": [],
"applicationFilter": null
},
"users": {
"@odata.type": "#microsoft.graph.conditionalAccessUsers",
"includeUsers@odata.type": "#Collection(String)",
"includeUsers": [
"All"
],
"excludeUsers@odata.type": "#Collection(String)",
"excludeUsers": [],
"includeGroups@odata.type": "#Collection(String)",
"includeGroups": [],
"excludeGroups@odata.type": "#Collection(String)",
"excludeGroups": [
"2802b872-ccfb-4b29-a9a9-459808dfb11b",
"f389fc8e-3965-4ae0-aa53-87511ab05f2b"
],
"includeRoles@odata.type": "#Collection(String)",
"includeRoles": [],
"excludeRoles@odata.type": "#Collection(String)",
"excludeRoles": [],
"includeGuestsOrExternalUsers": null,
"excludeGuestsOrExternalUsers": null
},
"authenticationFlows": {
"@odata.type": "#microsoft.graph.conditionalAccessAuthenticationFlows",
"transferMethods@odata.type": "#microsoft.graph.conditionalAccessTransferMethods",
"transferMethods": "deviceCodeFlow,authenticationTransfer"
}
},
"grantControls": {
"@odata.type": "#microsoft.graph.conditionalAccessGrantControls",
"operator": "OR",
"builtInControls@odata.type": "#Collection(microsoft.graph.conditionalAccessGrantControl)",
"builtInControls": [
"block"
],
"customAuthenticationFactors@odata.type": "#Collection(String)",
"customAuthenticationFactors": [],
"termsOfUse@odata.type": "#Collection(String)",
"termsOfUse": [],
"authenticationStrength@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')/grantControls/authenticationStrength/$entity",
"authenticationStrength@odata.associationLink": "https://graph.microsoft.com/beta/identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')/grantControls/authenticationStrength/$ref",
"authenticationStrength@odata.navigationLink": "https://graph.microsoft.com/beta/identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')/grantControls/authenticationStrength",
"authenticationStrength": null
},
"#microsoft.graph.restore": {
"title": "microsoft.graph.restore",
"target": "https://graph.microsoft.com/beta/identity/conditionalAccess/policies('1bf06972-bd5c-4d06-98ce-6b5bf5f1959f')/microsoft.graph.restore"
},
"Tag": "jv-CAF-2026.2.1",
"summary": "The CA004-Global-IdentityProtection-AnyApp-AnyPlatform-AuthenticationFlows policy blocks device code flow and authentication transfer for all users across every cloud app. Device code flow is a favourite trick in phishing campaigns, where an attacker persuades someone to enter a code on a legitimate Microsoft page and quietly takes over their session. Very few organisations need these flows day to day, so blocking them removes a well known attack path with barely any user impact."
}