Conditional Access Policy Simulator — test Microsoft Entra ID Conditional Access policies with What If, a gap finder and a health check

~/conditional-access-policy-simulator nis2 azure naming headers ☕ Support me apps ← about me
// microsoft entra id · what if · zero trust · runs in your browser
Conditional Access Policy Simulator — test Entra ID policies before you switch them on
Build policies with the same options as the Entra admin center, or import your own from Microsoft Graph. Then run What If sign-ins, find coverage gaps across every platform and device, and get a health check with lockout and legacy-auth warnings. Nothing leaves your browser.

SIGN-IN SCENARIO

Device
Device attributes for filters
Risk and flows

POLICIES

Guide — test your Conditional Access design in five steps

Start with the sample tenant or your own policies. Nothing is uploaded and nothing touches your tenant.
1Load policies

The page opens with a sample tenant of ten policies. Press Import to paste your own policies as Microsoft Graph JSON, or add Microsoft templates on the Policies tab.

2Edit like in Entra

Every policy has the Entra sections: users, target resources, network, conditions, grant and session. Click the state button to switch between On, Report-only and Off.

3Run What If

Pick a user, app, platform, client, IP address, country, device state and risk. The decision shows block, grant or the prompts, with a condition-by-condition trace per policy.

4Find the gaps

The Gap finder runs every user against 18 platform and client combinations on the office network and the internet, on managed and BYOD devices. Red means password only.

5Fix and export

The Health check flags lockout risks, legacy authentication and missing protections. Export the result as Graph JSON, report-only by default.

How the simulator decides

RULESThe same order as Entra

Every policy is checked for every sign-in. Order and policy names don't matter.

Conditions
All configured conditions must match (AND)
Exclusions
Always win over inclusions
Block
One applying block policy denies access
Grant
Requirements of every applying policy add up
Report-only
Evaluated and shown, never enforced
REALISMWhat it checks

The details that decide real sign-ins.

Methods
Registered methods against authentication strengths, per platform
Legacy
Legacy clients can't satisfy MFA or any other prompt
Devices
Browsers that don't pass the device identity look unregistered
Filters
Device filter rules, with null values for unregistered devices
Session
Shortest sign-in frequency, persistent browser, App Control
LIMITSWhat it does not model

Always confirm with the What If tool in the Entra admin center and with report-only mode.

Identity
Nested and dynamic groups, workload identities
Tenant
Cross-tenant trust for guest MFA and device claims
Signals
How risk is detected, Global Secure Access compliant network
Tokens
Token lifetimes, continuous access evaluation events

Conditional Access in Microsoft Entra ID, explained

Conditional Access is the policy engine of Microsoft Entra ID (formerly Azure AD). After the first factor, Entra collects the signals of a sign-in (who, which app, which device, from where, how risky) and checks them against every Conditional Access policy in the tenant. This free Conditional Access policy simulator rebuilds that evaluation in your browser, so you can design and test policies, import the policies of your own tenant and find gaps before you change anything in production.

How Conditional Access evaluates a sign-in

Report-only mode

A policy in report-only mode is evaluated at every sign-in and its result is written to the sign-in logs, but it is never enforced. Microsoft's templates suggest starting in report-only mode. In the simulator, report-only policies appear in purple with the result they would have, so you can see the impact before you switch a policy on.

Users, roles, guests and emergency access accounts

Policies target all users, specific users and groups, directory roles such as Global Administrator, or guest and external user types (B2B collaboration guests and members, B2B direct connect users, local guests, service provider users and other external users). Microsoft recommends at least two cloud-only emergency access (break-glass) accounts, excluded from every policy, so a mistake can never lock every administrator out. Mark them in the Directory tab: the Health check then warns about every policy that would still apply to them.

Target resources, user actions and authentication context

A policy targets All resources (formerly All cloud apps), selected apps such as the Office 365 app group (Exchange Online, SharePoint, Teams and related services), the Microsoft Admin Portals group or the Windows Azure Service Management API (Azure portal, Azure PowerShell and CLI). Instead of apps, a policy can target a user action (Register security information or Register or join devices) or an authentication context such as c1, which apps like SharePoint request for sensitive content.

Policies that target All resources but exclude some apps used to be skipped for sign-ins that request only basic OpenID Connect or a few limited directory scopes. From June 2026 Microsoft rolls out enforcement of those policies for such sign-ins as well (message center MC1223829). The Health check marks every policy with resource exclusions so you can check custom apps.

Network, device platforms and client apps

The network condition (shown as Locations in older screenshots) works with named locations: IPv4 or IPv6 ranges that you can mark as trusted, and country lists. Countries can't be marked as trusted. Type an IP address and a country in the What If form and the simulator shows every named location that matches. Device platforms are Android, iOS, Windows, macOS, Linux and Windows Phone; a policy that includes any device and excludes the known platforms catches unknown or spoofed user agents. Client apps are browser, mobile apps and desktop clients, Exchange ActiveSync and other clients. The last two are legacy authentication (POP, IMAP, SMTP AUTH, older Office clients): they can't do MFA, which is why blocking them is one of Microsoft's base policies.

Filter for devices: rule syntax

A device filter includes or excludes devices with a rule like device.trustType -ne "ServerAD" -and device.isCompliant -ne "True". The simulator parses the same syntax, both -eq and == forms, with parentheses, -and and -or.

PropertyValuesOperators
trustTypeAzureAD (joined), ServerAD (hybrid joined), Workplace (registered)-eq, -ne
isCompliant"True", "False"-eq, -ne
deviceOwnershipCompany, Personal-eq, -ne
operatingSystem, operatingSystemVersion, model, manufacturer, displayName, extensionAttribute1–15any string-eq, -ne, -startsWith, -endsWith, -contains, -in and their -not forms

An unregistered device has no properties: every value is null. Positive operators (-eq, -startsWith, -in…) then never match and negative operators (-ne, -notIn…) always match. That is why Microsoft recommends negative operators to target unmanaged devices. A rule can be at most 3,072 characters long.

Grant controls and authentication strengths

A policy blocks access or grants it with controls: require MFA, an authentication strength, a compliant device, a Microsoft Entra hybrid joined device, an app protection policy, a password change, risk remediation or terms of use. Require approved client app was retired in 2026; policies that still contain it no longer enforce it, and the simulator shows that. The three built-in authentication strengths accept these methods:

MethodMFAPasswordless MFAPhishing-resistant MFA
FIDO2 security key / passkey✓✓✓
Windows Hello for Business or platform credential✓✓✓
Certificate-based authentication (multifactor)✓✓✓
Microsoft Authenticator phone sign-in✓✓
Temporary Access Pass✓
Password + push, SMS, voice or OATH code✓

Give each user the methods they really registered in the Directory tab. An admin with only Authenticator push then shows as blocked by a phishing-resistant policy, and Windows Hello only counts on Windows.

Device-based controls in the browser

For require compliant device and hybrid joined device, Entra must see the device. Apps and Edge with a signed-in work profile pass the device identity; Chrome on Windows needs the Microsoft Single Sign On extension or the built-in Windows accounts setting, and some other browsers don't pass it at all. Untick browser passes the device identity in the What If form to see what a user on such a browser gets: the device looks unregistered, so the policy can't be satisfied.

Session controls

Session controls shape the session after access is granted: sign-in frequency (hours, days or every time), persistent browser session (only with All resources), app enforced restrictions for SharePoint and Exchange, Conditional Access App Control through Microsoft Defender for Cloud Apps, and disabling resilience defaults. When several applying policies set a sign-in frequency, the simulator shows the shortest one.

Import the policies of your own tenant

Read your policies with an account that can read Conditional Access (for example Security Reader or Global Reader) and paste the JSON into Import:

Connect-MgGraph -Scopes Policy.Read.All
(Invoke-MgGraphRequest -Uri 'v1.0/identity/conditionalAccess/policies' -OutputType Json) | Set-Content ca-policies.json
(Invoke-MgGraphRequest -Uri 'v1.0/identity/conditionalAccess/namedLocations' -OutputType Json) | Set-Content ca-locations.json

User, group, role, app and location IDs that the simulator doesn't know become placeholders in the Directory tab: give them a name and set group membership, roles and methods for your test users. The JSON stays in your browser's local storage until you load the sample again. A share link puts the policies in the link itself, so only share it with people who may see them.

This simulator or the What If tool in Entra?

The What If tool in the Entra admin center evaluates the real policies against real users and needs access to the tenant. This simulator is for the step before: designing policies, explaining them to colleagues, testing ideas without permissions and finding gaps across hundreds of combinations at once. Use both: design and test here, then confirm in Entra with What If and report-only mode.

More free tools