Insight

Conditional Access policy library: ten policies as JSON, ready to import

The ten-policy Entra ID Conditional Access baseline as a downloadable JSON library with the Graph PowerShell to import it in report-only mode, plus the order to enable each policy.

This is the baseline from our Conditional Access framework article as something you can actually use: ten policies in Microsoft Graph JSON, a script that imports them into your tenant in report-only mode, and the order in which to switch them on. Free, no email required. Download the JSON library

What is in the file

PolicyUsersControlLicence
CA001-AllUsers-AllApps-LegacyAuth-BlockAll (excl. break-glass)BlockP1
CA002-Admins-AllApps-AnyPlatform-PhishingResistantMFA14 privileged rolesAuthentication strength: phishing-resistantP1
CA003-AllUsers-AllApps-AnyPlatform-RequireMFAAll (excl. break-glass, service accounts)MFAP1
CA004-AllUsers-M365-AnyPlatform-RequireCompliantDeviceAll membersCompliant device or Entra hybrid joinedP1 + Intune
CA005-AllUsers-AllApps-UnsupportedPlatforms-BlockAllBlock Linux/other, ChromeOS optionalP1
CA006-AllUsers-AdminPortals-AnyPlatform-RequireMFAAllMFA + sign-in frequency 1 hourP1
CA007-Guests-AllApps-AnyPlatform-MFA-LimitedAppsGuests and externalMFA; Office 365 onlyP1
CA008-AllUsers-AllApps-HighRisk-BlockAllBlock on high user or sign-in risk; MFA on mediumP2
CA009-AllUsers-AllApps-BlockedCountries-BlockAll (excl. travel group)Block named location "Blocked countries"P1
CA010-AllUsers-M365-UnmanagedDevice-BrowserOnlyAllApp-enforced restrictions; no downloadP1

Import in report-only mode

Every policy in the file has "state": "enabledForReportingButNotEnforced". Nothing changes for your users until you flip a policy to enabled. You need the Conditional Access Administrator role and the Graph PowerShell SDK; sign in interactively in a browser.

Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess","Policy.Read.All","Application.Read.All"
$lib = Get-Content .\conditional-access-baseline.json -Raw | ConvertFrom-Json
foreach ($p in $lib.policies) {
  $body = $p | ConvertTo-Json -Depth 20
  Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" -Body $body -ContentType "application/json"
  Write-Host "Created (report-only):" $p.displayName
}

Before you run it, replace the three placeholders in the file: the break-glass group id, the named location id for blocked countries, and (for CA002) your admin roles if you have customised them. The README block at the top of the JSON lists all three.

The order to enable them

  1. CA001 (legacy auth) — after seven days report-only with zero legitimate hits.
  2. CA002 (admins) — the day your admins have FIDO2 keys or passkeys registered.
  3. CA006 (admin portals) — same day as CA002.
  4. CA003 (MFA everyone) — after the registration campaign hits 95%.
  5. CA009 (countries) and CA005 (platforms) — low impact, enable together.
  6. CA007 (guests) — after telling the three partners who will notice.
  7. CA004 (compliant device) — only after Intune compliance is above 90%; this is the one that locks people out if you rush it.
  8. CA010 (unmanaged browser-only) — the week after CA004.
  9. CA008 (risk) — if you have P2; otherwise delete it.

We deploy exactly this library, tuned to your tenant and with the rollout managed, in the Microsoft 365 Hardening Sprint. If you use the free version and get stuck, the contact form works too.

Not sure where your business stands?

Book a free 30-minute call. We will tell you the three things we would fix first — no report to buy, no hard sell.

Book a free call