Entra ID Conditional Access Policy Design Baseline with Automatic Deployment Support

My Entra ID Conditional Access Policy Design Baseline is updated at least twice every year, always containing lessons learned from the field. It is based on my recommendations of how Conditional Access should be deployed to create a strong zero trust security posture.

Note that all organisations are different and you might need to adjust the baseline to fit your specific needs. My goal is to provide inspiration and a great starting point for your own Conditional Access design.

Current baseline version:15
Release date:2024-11-26

There are two methods of deployment:

Option 1: Manual Deployment

Download the Excel version of the baseline and manually create each Conditional Access policy in the Azure portal.

Option 2: Automatic Deployment

Version 7 of this baseline was the first version with DCToolbox automation support, and version 15 was the first to change deployment model to use the Conditional Access Gallery. This means that you can now automatically deploy this baseline with DCToolbox (or create your own JSON templates).

Please see this article for details of Conditional Access automation with DCToolbox: How to Manage Conditional Access as Code – The Ultimate Guide

To automatically install the baseline, run this in PowerShell 7:

# Install DCToolboc from the PowerShell Gallery:
Install-Module -Name DCToolbox -Force

# Deploy the baseline as a complete Conditional Access PoC in report-only mode, add a PILOT prefix, AND create documentation in Markdown format.
Deploy-DCConditionalAccessBaselinePoC -AddCustomPrefix 'PILOT - ' -CreateDocumentation

Baseline Policies Explained

This is a short explanation of each policy in the baseline.

Policies

  • GLOBAL – 1010 – BLOCK – Legacy Authentication
  • GLOBAL – 1020 – BLOCK – Device Code Auth Flow
  • GLOBAL – 1030 – BLOCK – Unsupported Device Platforms
  • GLOBAL – 1040 – BLOCK – All Countries Except Allowed
  • GLOBAL – 1050 – BLOCK – High-Risk Countries
  • GLOBAL – 1060 – BLOCK – Service Accounts (Trusted Locations Excluded)
  • GLOBAL – 1070 – BLOCK – Explicitly Blocked Cloud Apps
  • GLOBAL – 1080 – BLOCK – Guest Access to Sensitive Apps
  • GLOBAL – 1090 – BLOCK – High-Risk Sign-Ins
  • GLOBAL – 1100 – BLOCK – High-Risk Users
  • GLOBAL – 2010 – GRANT – Medium-Risk Sign-Ins
  • GLOBAL – 2020 – GRANT – Medium-Risk Users
  • GLOBAL – 2040 – GRANT – Terms of Use (All users)
  • GLOBAL – 2050 – GRANT – MFA for All Users
  • GLOBAL – 2055 – GRANT – Phishing Resistant MFA for Admins
  • GLOBAL – 2060 – GRANT – Mobile Apps and Desktop Clients
  • GLOBAL – 2070 – GRANT – Mobile Device Access Requirements
  • GLOBAL – 3010 – SESSION – Admin Persistence (9 hours)
  • GLOBAL – 3020 – SESSION – BYOD Persistence
  • GLOBAL – 3030 – SESSION – Register Security Info Requirements
  • GLOBAL – 3040 – SESSION – Block File Downloads On Unmanaged Devices
  • OVERRIDE – 0001 – GRANT – Example

GLOBAL – 1010 – BLOCK – Legacy Authentication

Policy NameGLOBAL – 1010 – BLOCK – Legacy Authentication
ID1010
DescriptionThis global policy blocks all connections from insecure legacy protocols like ActiveSync, IMAP, POP3, etc. Blocking legacy authentication, together with MFA, is one of the most important security improvements your can do in the cloud.
{
  "displayName": "GLOBAL - 1010 - BLOCK - Legacy Authentication",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Excluded from Legacy Authentication Block"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "exchangeActiveSync",
      "other"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1020 – BLOCK – Device Code Auth Flow

Policy NameGLOBAL – 1020 – BLOCK – Device Code Auth Flow
ID1020
DescriptionThis policy blocks users from signing in with OAuth 2.0 device authorization grant flow. https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-device-code
{
  "displayName": "GLOBAL - 1020 - BLOCK - Device Code Auth Flow",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Excluded from Device Code Auth Flow Block"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "authenticationFlows": {
      "transferMethods": "deviceCodeFlow,authenticationTransfer"
    },
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1030 – BLOCK – Unsupported Device Platforms

Policy NameGLOBAL – 1030 – BLOCK – Unsupported Device Platforms
ID1030
DescriptionBlock unsupported platforms like Windows Phone, Linux, and other OS variants. Note: Device platform detection is a best effort security signal based on the user agent string and can be spoofed. Always combine this with additional signals like MFA and/or device authentication.
{
  "displayName": "GLOBAL - 1030 - BLOCK - Unsupported Device Platforms",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": {
      "includePlatforms": [
        "all"
      ],
      "excludePlatforms": [
        "android",
        "iOS",
        "windows",
        "macOS"
      ]
    },
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Excluded from Legacy Authentication Block"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1040 – BLOCK – All Countries Except Allowed

Policy NameGLOBAL – 1040 – BLOCK – All Countries Except Allowed
ID1040
DescriptionThis global policy blocks all connections from countries not in the Allowed countries whitelist. You should only allow countries where you expect your users to sign in from. This is not a strong security solution since attackers will easily bypass this with a proxy service, however, this effectively blocks a lot of the automated noise in the cloud.
{
  "displayName": "GLOBAL - 1040 - BLOCK - Countries not Allowed",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "locations": {
      "excludeLocations": [
        "Allowed CountriesxxSExxNOxxDKxxFI"
      ],
      "includeLocations": [
        "All"
      ]
    },
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Excluded from Country Block List"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1050 – BLOCK – High-Risk Countries

Policy NameGLOBAL – 1050 – BLOCK – High-Risk Countries
ID1050
DescriptionThis global policy blocks all connections from countries in the High-Risk Countries list. This is not a strong security solution since attackers will easily bypass this with a proxy service, however, this effectively blocks a lot of the automated noise in the cloud.
{
  "displayName": "GLOBAL - 1050 - BLOCK - High-Risk Countries",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "locations": {
      "excludeLocations": [],
      "includeLocations": [
        "High-Risk CountriesxxKPxxRUxxIR"
      ]
    },
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1060 – BLOCK – Service Accounts (Trusted Locations Excluded)

Policy NameGLOBAL – 1060 – BLOCK – Service Accounts (Trusted Locations Excluded)
ID1060
DescriptionBlock service accounts (real Entra ID user accounts used by non-humans) from untrusted IP addresses. Service accounts can only connect from allowed IP addresses, but without MFA requirement. Only use service accounts as a last resort!
{
  "displayName": "GLOBAL - 1060 - BLOCK - Service Accounts (Trusted Locations Excluded)",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "locations": {
      "excludeLocations": [
        "Service Accounts Trusted IPs"
      ],
      "includeLocations": [
        "All"
      ]
    },
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [
        "Conditional Access Service Accounts"
      ],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1070 – BLOCK – Explicitly Blocked Cloud Apps

Policy NameGLOBAL – 1070 – BLOCK – Explicitly Blocked Cloud Apps
ID1070
DescriptionThis policy can be used to explicitly block certain cloud apps across the organisation. This is handy if you want to permanently block certain apps, or temporary block unwanted apps, for example, if there is a known critical security flaw.
{
  "displayName": "GLOBAL - 1070 - BLOCK - Explicitly Blocked Cloud Apps",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "None"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1080 – BLOCK – Guest Access to Sensitive Apps

Policy NameGLOBAL – 1080 – BLOCK – Guest Access to Sensitive Apps
ID1080
DescriptionBlock guests from accessing sensitive apps like Microsoft Admin Portals.
{
  "displayName": "GLOBAL - 1080 - BLOCK - Guest Access to Sensitive Apps",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": {
        "externalTenants": {
          "membershipKind": "all",
          "@odata.type": "#microsoft.graph.conditionalAccessAllExternalTenants"
        },
        "guestOrExternalUserTypes": "internalGuest,b2bCollaborationGuest,b2bCollaborationMember,b2bDirectConnectUser,otherExternalUser"
      },
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "MicrosoftAdminPortals",
        "797f4846-ba00-4fd7-ba43-dac1f8f63013"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1090 – BLOCK – High-Risk Sign-Ins

Policy NameGLOBAL – 1090 – BLOCK – High-Risk Sign-Ins
ID1090
DescriptionThis global policy blocks all high-risk authentications detected by Entra ID Protection. This is called risk-based Conditional Access. Note that this policy requires Entra ID P2 for all targeted users.
{
  "displayName": "GLOBAL - 1090 - BLOCK - High-Risk Sign-Ins",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": [
      "high"
    ]
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 1100 – BLOCK – High-Risk Users

Policy NameGLOBAL – 1100 – BLOCK – High-Risk Users
ID1100
DescriptionSame as above but looks at the user risk level instead of the sign-in risk level. For example, many medium risk sign-ins can result in a high-risk user.
{
  "displayName": "GLOBAL - 1100 - BLOCK - High-Risk Users",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [
      "high"
    ],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "block"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 2010 – GRANT – Medium-Risk Sign-Ins

Policy NameGLOBAL – 2010 – GRANT – Medium-Risk Sign-Ins
ID2010
DescriptionThis global policy enforces MFA on all medium-risk authentications detected by Entra ID Protection.
{
  "displayName": "GLOBAL - 2010 - GRANT - Medium-Risk Sign-ins",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": [
      "medium"
    ]
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": {
      "id": "00000000-0000-0000-0000-000000000002"
    }
  },
  "sessionControls": {
    "cloudAppSecurity": null,
    "continuousAccessEvaluation": null,
    "applicationEnforcedRestrictions": null,
    "signInFrequency": {
      "type": null,
      "value": null,
      "frequencyInterval": "everyTime",
      "authenticationType": "primaryAndSecondaryAuthentication",
      "isEnabled": true
    },
    "secureSignInSession": null,
    "persistentBrowser": null,
    "disableResilienceDefaults": null
  },
  "templateId": null
}


GLOBAL – 2020 – GRANT – Medium-Risk Users

Policy NameGLOBAL – 2020 – GRANT – Medium-Risk Users
ID2020
DescriptionSame as above but looks at the user risk level instead of the sign-in risk level.
{
  "displayName": "GLOBAL - 2020 - GRANT - Medium-Risk Users",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [
      "medium"
    ],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": {
      "id": "00000000-0000-0000-0000-000000000002"
    }
  },
  "sessionControls": {
    "cloudAppSecurity": null,
    "continuousAccessEvaluation": null,
    "applicationEnforcedRestrictions": null,
    "signInFrequency": {
      "type": null,
      "value": null,
      "frequencyInterval": "everyTime",
      "authenticationType": "primaryAndSecondaryAuthentication",
      "isEnabled": true
    },
    "secureSignInSession": null,
    "persistentBrowser": null,
    "disableResilienceDefaults": null
  },
  "templateId": null
}


GLOBAL – 2040 – GRANT – Terms of Use (All users)

Policy NameGLOBAL – 2040 – GRANT – Terms of Use (All users)
ID2040
DescriptionThis global policy forces Terms of Use, like an Terms of Use or NDA, on all users. Users must read and agree to this policy the first time they sign in before they’re granted access.
{
  "displayName": "GLOBAL - 2040 - GRANT - Terms of Use (All users)",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Conditional Access Service Accounts"
      ],
      "excludeRoles": [
        "d29b2b05-8046-44ba-8758-1e26182fcf32"
      ],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [],
    "customAuthenticationFactors": [],
    "termsOfUse": [
      "Terms of Use"
    ],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 2050 – GRANT – MFA for All Users

Policy NameGLOBAL – 2050 – GRANT – MFA for All Users
ID2050
DescriptionProtects all user authentications with MFA. This policy applies to both internal users and guest users on all devices and clients. Intune enrollment is excluded since MFA is not supported during enrollment of fully managed devices.
{
  "displayName": "GLOBAL - 2050 - GRANT - MFA for All Users",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Conditional Access Service Accounts"
      ],
      "excludeRoles": [
        "d29b2b05-8046-44ba-8758-1e26182fcf32"
      ],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [
        "0000000a-0000-0000-c000-000000000000"
      ],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": {
      "id": "00000000-0000-0000-0000-000000000002"
    }
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 2055 – GRANT – Phishing Resistant MFA for Admins

Policy NameGLOBAL – 2055 – GRANT – Phishing Resistant MFA for Admins
ID2055
DescriptionProtects privileged admin roles with phishing resistant MFA, like FIDO2.
{
  "displayName": "GLOBAL - 2055 - GRANT - Phishing Resistant MFA for Admins",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "deviceStates": null,
    "devices": null,
    "users": {
      "excludeGuestsOrExternalUsers": null,
      "includeRoles": [
        "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3",
        "0526716b-113d-4c15-b2c8-68e3c22b9f80",
        "158c047a-c907-4556-b7ef-446551a6b5f7",
        "17315797-102d-40b4-93e0-432062caca18",
        "e6d1a23a-da11-4be4-9570-befc86d067a7",
        "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9",
        "62e90394-69f5-4237-9190-012177145e10",
        "8ac3fc64-6eca-42ea-9e69-59f4c7b60eb2",
        "7be44c8a-adaf-4e2a-84d6-ab2649e08a13",
        "e8611ab8-c189-46e8-94e1-60213ab1f814",
        "194ae4cb-b126-40b2-bd5b-6091b380977d"
      ],
      "includeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "includeGroups": [],
      "excludeUsers": [],
      "includeGuestsOrExternalUsers": null,
      "excludeRoles": []
    },
    "clientApplications": null,
    "applications": {
      "includeAuthenticationContextClassReferences": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "applicationFilter": null,
      "excludeApplications": []
    },
    "signInRiskLevels": [],
    "userRiskLevels": [],
    "platforms": null,
    "clientAppTypes": [
      "all"
    ],
    "times": null,
    "locations": null
  },
  "grantControls": {
    "builtInControls": [],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": {
      "id": "00000000-0000-0000-0000-000000000004"
    },
    "operator": "OR"
  },
  "sessionControls": null,
  "partialEnablementStrategy": null,
  "templateId": null
}


GLOBAL – 2060 – GRANT – Mobile Apps and Desktop Clients

Policy NameGLOBAL – 2060 – GRANT – Mobile Apps and Desktop Clients
ID2060
DescriptionRequires mobile apps and desktop clients to be Intune compliant. BYOD is blocked.
{
  "displayName": "GLOBAL - 2060 - GRANT - Mobile Apps and Desktop Clients",
  "state": "disabled",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Conditional Access Service Accounts"
      ],
      "excludeRoles": [
        "d29b2b05-8046-44ba-8758-1e26182fcf32"
      ],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "mobileAppsAndDesktopClients"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "compliantDevice"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 2070 – GRANT – Mobile Device Access Requirements

Policy NameGLOBAL – 2070 – GRANT – Mobile Device Access Requirements
ID2070
DescriptionRequires apps to be protected by Intune App Protection Policies (MAM) on iOS and Android. This blocks third-party app store apps and encrypts org data on mobile devices.
{
  "displayName": "GLOBAL - 2070 - GRANT - Mobile Device Access Requirements",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": {
      "includePlatforms": [
        "android",
        "iOS"
      ],
      "excludePlatforms": []
    },
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access",
        "Conditional Access Service Accounts"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "mobileAppsAndDesktopClients"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [
        "0000000a-0000-0000-c000-000000000000"
      ],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "compliantApplication"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}


GLOBAL – 3010 – SESSION – Admin Persistence (9 hours)

Policy NameGLOBAL – 3010 – SESSION – Admin Persistence (9 hours)
ID3010
DescriptionThis policy disables token persistence for all accounts with admin roles assigned. It also sets the sign-in frequency to 9 hours. This is to protect against Primary Refresh Token stealing attacks by keeping such tokens few and short-lived. Always use separate cloud-only accounts for admin role assignments.
{
  "displayName": "GLOBAL - 3010 - SESSION - Admin Persistence",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": [
        "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3",
        "0526716b-113d-4c15-b2c8-68e3c22b9f80",
        "158c047a-c907-4556-b7ef-446551a6b5f7",
        "17315797-102d-40b4-93e0-432062caca18",
        "e6d1a23a-da11-4be4-9570-befc86d067a7",
        "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9",
        "62e90394-69f5-4237-9190-012177145e10",
        "8ac3fc64-6eca-42ea-9e69-59f4c7b60eb2",
        "7be44c8a-adaf-4e2a-84d6-ab2649e08a13",
        "e8611ab8-c189-46e8-94e1-60213ab1f814",
        "194ae4cb-b126-40b2-bd5b-6091b380977d"
      ]
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": null,
  "sessionControls": {
    "signInFrequency": {
      "frequencyInterval": "timeBased",
      "type": "hours",
      "value": 9,
      "isEnabled": true,
      "authenticationType": "primaryAndSecondaryAuthentication"
    },
    "cloudAppSecurity": null,
    "secureSignInSession": null,
    "disableResilienceDefaults": null,
    "applicationEnforcedRestrictions": null,
    "persistentBrowser": {
      "mode": "never",
      "isEnabled": true
    },
    "continuousAccessEvaluation": null
  },
  "templateId": null
}


GLOBAL – 3020 – SESSION – BYOD Persistence

Policy NameGLOBAL – 3020 – SESSION – BYOD Persistence
ID3020
DescriptionThis policy disables token persistence for all accounts signing in from a non-compliant (unmanaged) device. It also sets the sign-in frequency to 9 hours.
{
  "displayName": "GLOBAL - 3020 - SESSION - BYOD Persistence",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": {
        "externalTenants": {
          "membershipKind": "all",
          "@odata.type": "#microsoft.graph.conditionalAccessAllExternalTenants"
        },
        "guestOrExternalUserTypes": "internalGuest,b2bCollaborationGuest,b2bCollaborationMember,b2bDirectConnectUser,otherExternalUser,serviceProvider"
      },
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": {
      "excludeDevices": [],
      "excludeDeviceStates": [],
      "includeDevices": [],
      "includeDeviceStates": [],
      "deviceFilter": {
        "mode": "exclude",
        "rule": "device.isCompliant -eq True"
      }
    },
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "All"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": null,
  "sessionControls": {
    "signInFrequency": {
      "frequencyInterval": "timeBased",
      "type": "hours",
      "value": 9,
      "isEnabled": true,
      "authenticationType": "primaryAndSecondaryAuthentication"
    },
    "cloudAppSecurity": null,
    "secureSignInSession": null,
    "disableResilienceDefaults": null,
    "applicationEnforcedRestrictions": null,
    "persistentBrowser": {
      "mode": "never",
      "isEnabled": true
    },
    "continuousAccessEvaluation": null
  },
  "templateId": null
}


GLOBAL – 3030 – SESSION – Register Security Info Requirements

Policy NameGLOBAL – 3030 – SESSION – Register Security Info Requirements
ID3030
DescriptionRequire reauthentication when registering security info. This helps to protect against different identity theft attacks.
{
  "displayName": "GLOBAL - 3030 - SESSION - Register Security Info Requirements",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [
        "urn:user:registersecurityinfo"
      ],
      "includeApplications": [],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": null,
  "sessionControls": {
    "signInFrequency": {
      "frequencyInterval": "everyTime",
      "type": null,
      "value": null,
      "isEnabled": true,
      "authenticationType": "primaryAndSecondaryAuthentication"
    },
    "cloudAppSecurity": null,
    "secureSignInSession": null,
    "disableResilienceDefaults": null,
    "applicationEnforcedRestrictions": null,
    "persistentBrowser": null,
    "continuousAccessEvaluation": null
  },
  "templateId": null
}


GLOBAL – 3040 – SESSION – Block File Downloads On Unmanaged Devices

Policy NameGLOBAL – 3040 – SESSION – Block File Downloads On Unmanaged Devices
ID3040
DescriptionThis policy blocks file downloads in SharePoint Online, Teams, OneDrive, and Exchange Online on unmanaged devices. Note that App Enforced Restrictions must be enabled in the services for this to work.
{
  "displayName": "GLOBAL - 3040 - SESSION - Block File Downloads On Unmanaged Devices",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "All"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": {
      "excludeDevices": [],
      "excludeDeviceStates": [],
      "includeDevices": [],
      "includeDeviceStates": [],
      "deviceFilter": {
        "mode": "exclude",
        "rule": "device.isCompliant -eq True"
      }
    },
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "00000003-0000-0ff1-ce00-000000000000"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": null,
  "sessionControls": {
    "signInFrequency": null,
    "cloudAppSecurity": null,
    "secureSignInSession": null,
    "disableResilienceDefaults": null,
    "applicationEnforcedRestrictions": {
      "isEnabled": true
    },
    "persistentBrowser": null,
    "continuousAccessEvaluation": null
  },
  "templateId": null
}


OVERRIDE – 0001 – GRANT – Example

Policy NameOVERRIDE – 0001 – GRANT – Example
ID0001
DescriptionFinally, this is an example policy. All scenarios that deviates from the global baseline should have the OVERRIDE prefix, and be targeted by groups. These groups of users can be excluded from global policies. In this way, we have a strong foundations, and manages deviations with small groups of users.
{
  "displayName": "OVERRIDE - 0001 - GRANT - Example",
  "state": "disabled",
  "conditions": {
    "platforms": null,
    "userRiskLevels": [],
    "clientApplications": null,
    "times": null,
    "deviceStates": null,
    "users": {
      "includeGuestsOrExternalUsers": null,
      "includeGroups": [],
      "excludeGuestsOrExternalUsers": null,
      "includeUsers": [
        "None"
      ],
      "excludeUsers": [],
      "excludeGroups": [
        "Excluded from Conditional Access"
      ],
      "excludeRoles": [],
      "includeRoles": []
    },
    "devices": null,
    "locations": null,
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "applicationFilter": null,
      "excludeApplications": [],
      "includeUserActions": [],
      "includeApplications": [
        "None"
      ],
      "includeAuthenticationContextClassReferences": []
    },
    "signInRiskLevels": []
  },
  "grantControls": {
    "operator": "OR",
    "builtInControls": [
      "mfa"
    ],
    "customAuthenticationFactors": [],
    "termsOfUse": [],
    "authenticationStrength": null
  },
  "sessionControls": null,
  "templateId": null
}

Summary

This baseline will work for many organisations out of the box but it can also serve as a starting point for a modified version. Some organisations might require different policys for differens departments and if that’s the case it is easy to just create multiple copies of the required policies and filter on group membership.

Please follow me here and on LinkedIn!

@DanielChronlund

47 thoughts on “Entra ID Conditional Access Policy Design Baseline with Automatic Deployment Support

  1. For your service account policy why are you including trusted locations and not just all locations? Also for the service accounts that we are including should that be all service accounts or just ones that are accessing things in Azure?

  2. I’m using “Trusted locations” because “All locations” might include “Untrusted locations” that I might use to block certain scenarios. I believe this is a flexible and clear design.

    The service accounts should only be the ones that authenticate with Azure AD. The service might be in the cloud or on-prem but the authentication happens in Azure AD and Conditional Access is used.

  3. On Service Accounts (Trusted Locations Excluded) shouldn’t be Include Any location and Exclude Selected locations (or maybe All trusted locations)?
    GRANT – MFA for All Users force even All guest and external users to install Microsoft Authenticator app, which is not an issue, but you should mention it.

  4. When testing the policy “Block – Service Accounts..” using the What If tool, a user in the service accounts group is:
    – Granted access if the account uses Modern Auth and is in an untrusted location.
    – Blocked access if the account is in the “office” location and uses legacy authentication (via the policy Block – Legacy Auth…)

    Can you confirm the above statements are correct when using this policy?

    Service accounts will typically use basic authentication, so the policy to block legacy auth will invalidate the use of this policy in this scenario – Unless this policy is not designed for this purpose?

    This is an excellent resource that we are starting to implement in our organisation, we just need a little clarification on this policy.
    We are attempting to secure accounts for scanners and other devices located in an office.
    These accounts can only use basic auth and are only allowed to authenticate from specific locations.
    Can this policy achieve the goal of the above scenario?

  5. Thank you! The BLOCK – Service Accounts policy blocks all authentications for the group with included service accounts, that comes from an IP adress not listed in the allowed service accounts trusted locations. The idea is that service accounts are bad and should not be able to sign-in, but we need a couple of them and they are only allowed to sign-in from a predefined set of IP-addresses. They should also be carefully monitored since they are excluded from MFA enforcement.

  6. Thanks for a great article!

    We also like to block unlicensed users with a dynamic group, admin accounts excluded.

    What’s your take on that?

  7. Thank you! It’s an interesting idea but I’m afraid you’re not allowed to do that. Only Azure AD Premium licensed users can benefit from Conditional Access.

  8. You are totally right about that! Never even thought about the license part..

    Would you also provide admin accounts with a AADP license for this same purpose?

  9. Yes, always buy AADP2 licenses to admin accounts so you can implement Just-In-Time-Access and Just-Enough-Administration with Azure AD PIM. This is a very important part of a zero trust mindset.

  10. Thanks a lot for the inside Daniel. Will follow your blog from now on 🙂

  11. Hi Daniel, great guide. Truely a great starting point.
    I have two questions though.
    1. Block all access from unmanaged devices
    I would need an additional block Policy if I wanted to block all acccess from private devices, right?
    I believe access from a private PC with browser or even Teams would work with this policy set (with MFA though). Is this correct? How would you achieve blocking all access from non-compliant devices? You stated in the intro that we can not filter on Access Controls 🙂
    In a network firewall I would add ”ANY ANY DROP” after all those policies, but how can I achieve this with AAD CA?
    2. allow OWA / OotW for a group (this is very special I believe, so feel free to skip ;-))
    Although we want to block everything from unmanaged devices, I need ONE exception. Outlook on the web should work for a special user group. Nothing else. While making the exception should be easy, I wonder how one can configure to BLOCK Outlook, Teams, … but allow OotW. There is no Cloud app for that, and Exchange Online includes a lot more.

  12. Thank you!

    1: Yes you are correct, browser will work. If you want to block unmanaged devices with browser also you can add Require compliant device to the browser policy in my baseline. The rest is already taken care of in the design.

    2: if you only want to allow Outlook on the web you can achieve this by blocking Desktop apps and only allow Browser. Then you block the other scenario for the same group.

  13. Hi Daniel, thank you for this fantastic resource. We’ve used this to build our first CA framework and we’re quite happy with the results. At this point we are opening up our tenant to guest access and we’re running into an odd problem.

    The CA baseline policies of:
    1: BLOCK – Guess Access (Allowed Apps Excluded)
    and
    2: GRANT – MFA for All Users

    For us this results in invited guests being blocked access to the ”Microsoft Invitation Acceptance Portal” and, according to the AAD sign-in logs, it’s the BLOCK – Guest Access policy that is being triggered. Guests receive a ”You don’t have access to this” message where the App name is the above.

    What’s even more strange is if they close and re-open the invitation link it opens just fine and then they are prompted to complete the MFA registration. Everything works fine afterwards. We’ve had a colleague recreate the same scenario with just the above 2 policies in another tenant. And, unfortunately, no such ”Microsoft Invitation Acceptance Portal” app exists in CA to be able to exclude it from the BLOCK policy… Wonderful! Have you run into this before / any suggestions or ideas? Thanks in advance!

  14. Yes we did 🙂 Got all excited that *this* was the secret sauce that would make it work for us. Alas, it did not 😦

  15. Thanks for commenting! Yes, My Apps with guest accounts is a hazel. The guest access still works but it’s very confusing for the guests when they first sign-in. I’m looking into solutions without tampering with security.

    I don’t want to use black-listing of apps since the whole reason for the policy is to make sure that Guests even can’t try to open federated apps like SAP and Service Now for example. We want to build multiple layers of security, not just to trust the authorisation in the app itself.

  16. Thanks for the confirmation of the issue. Also, thank you very much for a great blog post and a great tool with DCToolbox.I think it will become an essential part of my workflows.

  17. Daniel this was super helpful, thank you! We are preparing to deploy M365 E5 to our user base and are wanting to take a pretty conservative approach. During the new user registration period we only want users to access the myaccount.microsoft.com from trusted locations to prevent opportunities for brute force, until staff can get MFA setup. Is there a CA that would block access to the user registration portal from non trusted locations?

  18. Hey, Daniel. Thanks for the amazing article. Your Excel baseline template and Export-DCConditionalAccessPolicyDesign cmdlet do not include deviceFilter option which has replaced includeDeviceStates, excludeDeviceStates, includeDevices, excludeDevices. However, your JSON baseline template includes the deprecated options includeDeviceStates, excludeDeviceStates, includeDevices, excludeDevices.

  19. Another grateful thanks comment from me – after stumbling upon your post/site we now have a half decent understanding of CA along with a starter framework that we are tweaking for our environment and requirements.

    Question around SCCM/Intune managed devices (via Cloud Attach configured in SCCM) – do you know of a way to pick these devices and Grant access? The devices show as ‘Managed’ in the sign-in logs, but not as ‘Compliant’ because the Compliance is handled by SCCM (for now).

  20. Is it possible to import multiple individual json files via the import/export function instead of all in one single JSON file?

  21. Hey Daniel, Thanks for this Content.. i implemented Conditional Access on our Tenant. Now i have an issue with the guest accounts. When somebody try to acceppt my invitation, he went into an error. in the aad logs i see the reason is the “BLOCK – Guest Access (Allowed Apps Excluded)
    “: Microsoft App Access Panel can not exclude the Conditional Access Policy (cannot find this application with name or id)

    i think maybe it works with a custom invitation process where i redirect to a site on sharepoint as example..

    maybe you found already a better solution?
    thanks

  22. This is amazing work, has anyone found an easy way to get the id’s corresponding to these values:

    Replace with service account trusted named location

    Replace with allowed countries named location id

    Replace with terms of use id

    I’ve been doing this by creating a policy that has them in, subsequently exporting the policies and checking the json export. Just wondering whether there’s an easier way.

  23. Yes, the best way is to implment a custom process. Microsoft does not provide a way to approve the default guest landing page. You can specify another landing page, like Teams with Microsoft Graph.

  24. Yes:

    # Connect to Microsoft Graph with delegated credentials.
    $Parameters = @{
    ClientID = ”
    ClientSecret = ”
    }

    $AccessToken = Connect-DCMsGraphAsDelegated @Parameters

    # GET Named Locations.
    $Parameters = @{
    AccessToken = $AccessToken
    GraphMethod = ‘GET’
    GraphUri = ‘https://graph.microsoft.com/v1.0/identity/conditionalAccess/namedLocations’
    }

    Invoke-DCMsGraphQuery @Parameters

    # GET Terms of Use.
    $Parameters = @{
    AccessToken = $AccessToken
    GraphMethod = ‘GET’
    GraphUri = ‘https://graph.microsoft.com/v1.0/identityGovernance/termsOfUse/agreements’
    }

    Invoke-DCMsGraphQuery @Parameters

Leave a comment