Skip to content
Visual explainer 3h 30m to learn 5 steps

Roll out Conditional Access safely

Design, pilot in report-only mode and enforce Conditional Access policies with exclusions and rollback.

By Invicly Tech, , in Microsoft Entra & Microsoft 365 Administration. About 12 minutes to read.

Topic 8 of 31

In short

Conditional Access is the policy engine in Microsoft Entra ID that decides, at each sign-in, whether to allow access, ask for more proof or block. Each policy says who and what it applies to, under which conditions, and which controls to enforce. Rolling it out safely means excluding emergency accounts, testing in report-only mode with a pilot group, and keeping a quick way to switch a policy off.

Think of it like this: It is a building's security desk: it checks who you are, where you came from and what you are carrying, then waves you through, asks for ID or turns you away.

Explained simply

Conditional Access is a set of if-then rules for sign-ins. If this person, using this app, from this place or device, signs in, then require this. For example: if anyone signs in to any app, require MFA. Or: if someone signs in from a country you do not operate in, block it.

Every policy has three parts. Assignments say who and what it covers, such as all users or a pilot group, and all apps or just Exchange Online. Conditions add details like device platform, location or risk. Controls say what happens: block, or grant access only if the user passes MFA or uses a compliant device.

The danger is locking people out, including yourself. So you always exclude two emergency access accounts, sometimes called break-glass accounts. You also start every new policy in report-only mode. In that mode the policy only writes down what it would have done, and nobody is blocked.

After a week or two of report-only results look right, you turn the policy on for a small pilot group, then for everyone. If something goes wrong, you switch the policy back to off or report-only. That single switch is your rollback, so know where it is before you need it.

Press Play on a diagram to walk through it one step at a time.

FlowHow one Conditional Access policy is evaluated
  1. 1
    Sign-in arrives

    User, app, device, location, risk

  2. 2
    Assignments match?

    Users and target resources, minus exclusions

  3. 3
    Conditions match?

    Platform, location, client app, risk

  4. 4
    Apply grant control

    Block, or require MFA, strength or compliant device

  5. 5
    Apply session control

    Sign-in frequency, app restrictions

CycleSafe rollout loop
  1. 1
    Design

    One goal per policy, with exclusions written down

  2. 2
    Report-only

    Policy logs what it would do; nothing is enforced

  3. 3
    Review results

    Sign-in logs and the insights workbook

  4. 4
    Enforce for pilot

    Small group, then wider rings

  5. 5
    Monitor and adjust

    Turn off or edit if users are blocked

  6. Back to step 1
MapA starter policy set
Conditional Access baseline
  • CA01 MFA for all users
    • All users, all resources
    • Exclude break-glass
  • CA02 Block legacy authentication
    • Client apps: other clients
    • Grant: block
  • CA03 Admins need phishing-resistant MFA
    • Directory roles
    • Authentication strength
  • CA04 Compliant device for sensitive apps
    • Pilot group first
    • Needs Intune

In depth

Signals, conditions and controls

At each sign-in Entra collects signals: the user and their groups and roles, the target resource (an app or a user action like registering security info), the IP address and its named location, the device platform, whether the device is compliant or hybrid joined, the client app type, and, with P2, user and sign-in risk.

A policy applies when its assignments and all its conditions match. Then its controls run. Grant controls are block access, or grant with requirements such as MFA, an authentication strength, a compliant device, a hybrid joined device or an approved client app. With several requirements you choose require all or require one. Session controls shape the session after sign-in, such as sign-in frequency or persistent browser session.

  • Signals: user, app, location, device, client app, risk
  • Conditions narrow the policy; all must match
  • Grant: block, or require one or all controls
  • Session: sign-in frequency, persistent browser, app restrictions

Assigning users and apps without gaps

Assign broadly and exclude narrowly. A baseline policy should include All users and All resources, then exclude only what must be excluded: the emergency accounts, and perhaps a directory sync account if you use one. Targeting a small group for a baseline control leaves everyone else unprotected and new staff fall outside it.

Use groups for pilots, rings and exceptions, and give each exception group an owner and an expiry. Name policies so their purpose is obvious, for example CA01 Require MFA for all users, CA02 Block legacy authentication, CA03 Require phishing-resistant MFA for admins. Keep one goal per policy; mixed policies are hard to reason about and hard to roll back. Guests and external users can be targeted separately when their controls differ.

Emergency access accounts

Create at least two cloud-only accounts on the tenant's onmicrosoft.com domain, with the Global Administrator role assigned permanently. Exclude them from every Conditional Access policy. They should not belong to a person, should not be synced from on-premises, and should not depend on one phone or one person's Authenticator.

Microsoft now requires MFA for admin portals such as the Azure portal and the Entra admin center, so emergency accounts also need a strong method. The recommended choice is passkeys on FIDO2 security keys stored in separate safes. Alert on every sign-in by these accounts through a log alert, and test them on a schedule, for example every quarter, so you know they work before a real outage.

  • At least two, cloud-only, onmicrosoft.com domain
  • Excluded from all Conditional Access policies
  • Protected with passkeys on separate security keys
  • Every sign-in raises an alert
  • Tested on a regular schedule

Report-only, pilot, enforce

Create the policy with state Report-only. Each sign-in that matches now records Report-only: Success, Report-only: Failure, Report-only: User action required or Report-only: Not applied in the sign-in log's Conditional Access tab. The Conditional Access insights and reporting workbook totals these across users, which needs Log Analytics; without it, filter the sign-in logs directly.

Look for users who would fail and why. Fix those first, for example by getting them registered for MFA. Then set the policy to On for a pilot group of IT staff and willing volunteers, then a wider ring, then all users. One caveat: report-only policies that require a compliant device can still prompt some macOS, iOS and Android users to pick a device certificate, so pilot those with a group.

FlowRings from report-only to everyone
  1. Step 1
    Report-only, all users

    One to two weeks of evidence

  2. Step 2
    On, IT pilot

    Ten to twenty people who can report issues

  3. Step 3
    On, ring 1

    One department

  4. Step 4
    On, all users

    Exclusions limited to break-glass

Enforcing and rolling back

Before switching a policy on, write the rollback: the policy name and ID, who may change it, and the exact step (set state to Off or Report-only). Pick a quiet time and tell the service desk. After enforcing, watch sign-in failures for the policy's targets for the first hours.

If users are blocked unexpectedly, roll back first and investigate second. Changes to a policy apply to new sign-ins quickly, but users with existing sessions may need to sign in again. Every policy change is written to the audit logs under the Conditional Access category with old and new values, which is your evidence of what changed and when. Export policies to JSON before big changes so you can restore them exactly.

Learn it in 5 short steps

About 40m each. Track them with a timer in your plan.

  1. 1
    Read signals, conditions and controls~40m
  2. 2
    Assign users and apps~40m
  3. 3
    Exclude emergency accounts~40m
  4. 4
    Pilot in report-only mode~40m
  5. 5
    Enforce and roll back~40m

Key points

  • Conditional Access needs Microsoft Entra ID P1; security defaults are the free, fixed alternative and cannot run alongside it.
  • All matching policies apply together: a block in any one wins, and every grant requirement must be met.
  • Always exclude at least two cloud-only emergency access accounts and protect them with phishing-resistant methods.
  • Run new policies in report-only mode first, then enforce for a pilot group before everyone.
  • Rollback is setting the policy state back to off or report-only; record the policy ID so you can do it fast.

Key terms

Tap a card to flip it. 0/5 known

Examples

powershell
Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess","Policy.Read.All"
$policy = @{
  displayName = "CA01 Require MFA for all users (pilot)"
  state       = "enabledForReportingButNotEnforced"   # report-only
  conditions  = @{
    users        = @{ includeGroups = @("<pilot-group-id>"); excludeUsers = @("<breakglass1-id>","<breakglass2-id>") }
    applications = @{ includeApplications = @("All") }
    clientAppTypes = @("all")
  }
  grantControls = @{ operator = "OR"; builtInControls = @("mfa") }
}
New-MgIdentityConditionalAccessPolicy -BodyParameter $policy

Create a report-only MFA policy for a pilot group with two emergency accounts excluded.

Blocking legacy authentication at Fabrikam

Legacy protocols like POP and IMAP with basic auth cannot do MFA, so attackers use them for password spraying. Step 1: create CA02 with Users All, exclude break-glass, Target resources All, Conditions Client apps Exchange ActiveSync clients and Other clients, Grant Block, state Report-only. Step 2: after a week, filter sign-in logs for Report-only: Failure on CA02; you find a scanner that sends email with SMTP basic auth. Step 3: move the scanner to a supported method, then set CA02 to On. Evidence: no new legacy successes in the logs. Rollback: set CA02 back to Report-only.

powershell
Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess"
$id = (Get-MgIdentityConditionalAccessPolicy -Filter "displayName eq 'CA02 Block legacy authentication'").Id
# enforce
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId $id -State "enabled"
# roll back
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId $id -State "enabledForReportingButNotEnforced"

Backing up policies before a change

Before editing several policies, export each to a JSON file named by its ID. If a change goes wrong, you can compare old and new versions and restore the old settings. Keep the export in a secured location, because policy files reveal your exclusions and named locations.

powershell
Connect-MgGraph -Scopes "Policy.Read.All"
$dir = "./ca-backup-$(Get-Date -Format yyyyMMdd)"
New-Item -ItemType Directory -Path $dir | Out-Null
Get-MgIdentityConditionalAccessPolicy -All | ForEach-Object {
  $_ | ConvertTo-Json -Depth 10 | Set-Content "$dir/$($_.Id).json"
}

Quick reference

  • Conditional Access needs Entra ID P1; security defaults must be turned off to use it
  • Policy states: On, Off, Report-only (enabledForReportingButNotEnforced in Graph)
  • Every matching policy applies; any block wins
  • Include broadly, exclude narrowly, and give every exclusion group an owner
  • Exclude two cloud-only break-glass accounts protected by passkeys on security keys
  • Report-only results show in the sign-in log's Conditional Access tab
  • Rollback = set the policy to Off or Report-only; changes are in the audit log

Common mistakes

  • Creating a block policy for All users with no exclusions and locking every admin out, including yourself.
  • Jumping straight from design to enforced for everyone without reading report-only results.
  • Excluding a large group to fix one complaint, quietly leaving many users unprotected.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Which policy state lets you see the effect of a policy without blocking anyone?

Question 2

2One matching policy grants with MFA; another blocks access. What happens?

Question 3

3What is the best way to roll out a baseline MFA policy to a new tenant?

Question 4

4Which accounts should be excluded from every Conditional Access policy?

Question 5

5How do you find who changed a Conditional Access policy last week?

0/5 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    List every Conditional Access policy in a lab tenant with its state, and find any that are still Off.

  2. Exercise 2medium

    Design CA01 Require MFA for all users on paper: assignments, exclusions, conditions, controls, state, pilot plan and rollback.

  3. Exercise 3hard

    In a trial tenant with P1, create CA01 in report-only for a pilot group, sign in as a pilot user, find the report-only result, then enforce and roll back. Record evidence for each step.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

What is the difference between security defaults and Conditional Access?
Security defaults are a free on or off switch with fixed rules such as MFA registration for everyone. Conditional Access needs P1 and lets you write your own targeted policies. You cannot use both at once.
How long should a policy stay in report-only?
Long enough to cover a normal business cycle, often one to two weeks, so you see monthly or weekly tasks too. Move on once the results are understood.
Can I test Conditional Access without a paid licence?
Entra ID P2 and Microsoft 365 E5 trials include it for a limited time. Without one, design policies on paper and practise reading synthetic sign-in log entries.
Will a policy change kick users out immediately?
Not always. Policies apply at token issue, so existing sessions may continue until the next sign-in or token refresh. Revoke sessions if you need an immediate effect.

Go deeper

ShareXLinkedInWhatsApp