CAPolicies
Block

CIS - Block device code flow signin

Block access

About this policy

The CIS - Block device code flow signin policy prevents all users in your tenant from authenticating via the device code flow. Device code flow is a legitimate method designed for input-constrained devices, but it is frequently abused in phishing campaigns where attackers trick users into entering a code that grants them access. Blocking it across the board removes this attack surface entirely, which is a straightforward win if device code flow is not something your organisation actively needs.

Policy conditions

Users
All users
Apps
All cloud apps

JSON template

{
  "templateId": null,
  "displayName": "CIS - Block device code flow signin",
  "modifiedDateTime": null,
  "state": "enabledForReportingButNotEnforced",
  "deletedDateTime": null,
  "partialEnablementStrategy": null,
  "sessionControls": null,
  "conditions": {
    "userRiskLevels": [],
    "signInRiskLevels": [],
    "clientAppTypes": [
      "all"
    ],
    "platforms": null,
    "locations": null,
    "times": null,
    "deviceStates": null,
    "devices": null,
    "clientApplications": null,
    "agents": null,
    "applications": {
      "includeApplications": [
        "All"
      ],
      "excludeApplications": [],
      "includeUserActions": [],
      "includeAuthenticationContextClassReferences": [],
      "applicationFilter": null
    },
    "users": {
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "includeGroups": [],
      "excludeGroups": [],
      "includeRoles": [],
      "excludeRoles": [],
      "includeGuestsOrExternalUsers": null,
      "excludeGuestsOrExternalUsers": null
    },
    "authenticationFlows": {
      "transferMethods": "deviceCodeFlow"
    }
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/policies('dd192b5a-00de-4781-bed7-8306f17ff641')/grantControls/authenticationStrength/$entity",
    "authenticationStrength": null
  },
  "Tag": "CIS",
  "summary": "The CIS - Block device code flow signin policy prevents all users in your tenant from authenticating via the device code flow. Device code flow is a legitimate method designed for input-constrained devices, but it is frequently abused in phishing campaigns where attackers trick users into entering a code that grants them access. Blocking it across the board removes this attack surface entirely, which is a straightforward win if device code flow is not something your organisation actively needs."
}