HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Autopilot AutopilotConditional AccessMicrosoft Entra IDIntuneOOBEDevice ComplianceEnrollmentMicrosoft GraphPowerShellTroubleshooting

The Autopilot Conditional Access deadlock: requiring a compliant device can block the enrolment that makes devices compliant

IA
Imran Awan
21 August 2026

On Friday afternoon someone tightened your Conditional Access baseline. On Monday morning every new laptop dies in the out-of-box experience. Nobody touched Autopilot, nobody touched Intune, and the devices that were already enrolled are perfectly happy. Only the brand-new ones fail. That shape of outage almost always points at the same thing: a policy that asks a device to prove something it cannot possibly know yet.

Conditional Access (CA) is the gate. Device compliance is the claim the gate wants to see. Compliance is a statement Intune makes about a device it already manages. A factory-fresh Autopilot device is not managed yet, so it has no compliance state to present. Ask for that state at the wrong moment and you have blocked the enrolment that would have produced it. This post explains exactly where in the out-of-box experience (OOBE) that happens, which shapes of policy cause it, which shapes Microsoft explicitly says do not, and how to prove which one you have before you edit anything.

The short version

A Conditional Access policy that requires a compliant device for All users and All resources with no resource exclusions does not block Intune enrolment, because Microsoft excludes the Microsoft Intune Enrollment application by default to avoid exactly this circular dependency. The deadlock appears in the other shapes: a block-everything-except-a-list policy whose list omits the enrolment apps, a Terms of Use requirement that reaches the enrolment app, a hybrid-join requirement while the hybrid compliance state is still reported as N/A, or a BitLocker compliance rule with no grace period. Diagnose it in the Microsoft Entra sign-in logs on the Conditional Access tab, looking for error 53000 or 53001 against Microsoft Intune Enrollment. Fix it by excluding Microsoft Intune Enrollment and Microsoft Intune from the restrictive policy, and by moving any enrolment-time multifactor requirement onto the Register or join devices user action.

The problem: OOBE fails and nothing on the device is broken

The failures do not look like Conditional Access failures. That is what makes this expensive. Autopilot surfaces a generic wall of text, and the person holding the laptop reports whatever it says.

The three faces of this outage are worth learning by sight. First, a plain interruption on the sign-in page during OOBE. Microsoft documents the generic version of this as Something went wrong, and the documented first cause is that the client cannot reach the required identity endpoints. A Conditional Access block produces a similar-looking interruption for a completely different reason, which is why you cannot diagnose this from the device screen alone.

Second, the Enrollment Status Page (ESP) hangs and then times out. Microsoft documents this precise combination: you are using the ESP to track store apps, you have a CA policy that uses the Require device to be marked as compliant control, and that policy applies to all cloud apps and to Windows. The device sits waiting for a compliance verdict it cannot obtain, and the page expires before the sign-in screen loads.

Third, the device gets through OOBE and then a user cannot sign in to anything. This is the Microsoft Entra hybrid joined variant. Microsoft documents that a hybrid Autopilot deployment initially associates two device IDs with the same physical machine, one Microsoft Entra ID and one hybrid, and that the hybrid compliance state displays as N/A until a user signs in. Intune only syncs with the hybrid device ID after a successful user sign-in. A device-based policy that blocks on compliance will block during that window, and Microsoft states plainly that this behaviour is intended.

Context: Microsoft is explicit that the simplest, most-recommended shape is safe. In the documented walkthrough for requiring device compliance, the note reads that you can enrol new devices to Intune even if you select Require device to be marked as compliant for All users and All resources, and that the control does not block Intune enrolment. If your policy is that shape, with no resource exclusions, the deadlock is not your problem and you should keep looking.

So the interesting question is not "does requiring compliance break Autopilot". It is "what did we add on top of the plain policy that removed the safety net". There are only a handful of answers.

Why it happens: compliance is a fact about a device you already manage

To see where the deadlock lands you need the enrolment order of operations. Microsoft documents the user-driven Autopilot sequence as eight steps. Compressed, and with the identity events called out:

StepWhat the device doesIdentity state at that moment
1Connects to a network and downloads its Autopilot profileNo device identity, no user token
2Checks for critical OOBE updates and may restartStill anonymous to your tenant
3Prompts for Microsoft Entra credentials with your brandingFirst interactive user sign-in of the device life
4Joins Microsoft Entra ID, or Active Directory, per the profileDevice object created, no compliance record
5Enrols in Intune, via MDM auto-enrolment during the joinNow managed, compliance not yet evaluated
6Shows the Enrollment Status Page, if configuredCompliance evaluation begins
7Signs the user in to Windows with the credentials from step 3Primary Refresh Token issued
8Shows the ESP again for user-targeted workCompliance may still be pending

Read steps 4 and 5 together. The Microsoft Entra device object exists before Intune manages the device. Compliance is a verdict Intune reaches about a device it manages, so compliance necessarily arrives after both. Any grant control that asks about device state before step 5 is asking a question with no answer. That is the whole mechanism.

The applications involved, and their documented IDs

Conditional Access does not evaluate "enrolment". It evaluates token requests for named resources. These are the resources that matter during OOBE, with the application IDs Microsoft publishes for them.

Display nameApplication IDWhy it matters at OOBE
Microsoft Intune Enrollmentd4ebce55-015a-49b5-a083-c84d1797ae8cThe enrolment resource itself. Microsoft documents this app ID in the guidance for requiring multifactor authentication at enrolment.
Microsoft Intune0000000a-0000-0000-c000-000000000000Ongoing management and sync. Microsoft documents excluding this app ID from policies requiring MFA so that device sync can use user credentials.
Windows Store for Business45a330b1-b1ec-4cc1-9161-9f03992aa49fMicrosoft suggests excluding this app from device compliance policies if you use Subscription Activation to step up a Windows edition.
Windows Azure Active Directory00000002-0000-0000-c000-000000000000Included in All resources but individually targetable. Directory reads during sign-in map here.
Gotcha: you cannot exclude an application that has no service principal in your tenant. Microsoft documents that the Microsoft Intune Enrollment cloud app is not created automatically for new tenants, and that a Microsoft Entra administrator must create a service principal object with app ID d4ebce55-015a-49b5-a083-c84d1797ae8c using PowerShell or Microsoft Graph. On a young tenant the app simply will not appear in the resource picker, which sends people looking for a typo that is not there.

The four shapes that actually deadlock

Microsoft's Autopilot known-issues article carries a section titled Device-based Conditional Access policies. It is the single most useful paragraph on this subject, and it names the shapes.

ShapeWhat breaksDocumented remedy
Block all apps except an exclusion list, plus a second policy requiring compliance for the apps on that listThe enrolment resources are not on the list, so the block policy catches themPut Microsoft Intune Enrollment and Microsoft Intune on the exclusion list of the block policy
Any policy requiring Terms of Use that reaches the enrolment appTerms of Use is not supported for the Intune Enrollment appExclude the Intune Enrollment app from every Terms of Use policy
Device-based policy blocking on compliance during a hybrid Autopilot deploymentHybrid compliance shows N/A until a user signs in; Intune syncs the hybrid device ID only after that sign-inHave a user sign in, or modify the device-based policy. Microsoft states the CA behaviour here is intended
Compliance policy that evaluates BitLocker or Secure Boot with no grace periodThose states are not captured until the device reboots, so they cannot be used yetGive the compliance policy a grace period; Microsoft notes it can be as short as 0.25 days

The key sentence in that Microsoft section, and the one that resolves the chicken-and-egg framing, is this: if a policy is in place such that all cloud apps require a compliant device and there is no exclusion list, then by default Microsoft Intune Enrollment is excluded, so that the device can register with Microsoft Entra ID and enrol with Intune, and avoid a circular dependency.

Watch out: the moment you add an explicit resource exclusion to an All resources policy, you have taken over responsibility for the exclusion list. Do not assume the built-in enrolment exclusion still covers you. Microsoft separately warns against Block access for all users and all resources, and against Require device to be marked as compliant for all users and all resources when nobody has enrolled a device yet, because that configuration blocks all access including access to the Intune portal, locking out an administrator who has no enrolled device.

The multifactor-authentication variant

Requiring MFA at enrolment is a legitimate, documented configuration. It is not the deadlock. The failure mode is different, and it comes from where you attach the requirement.

Microsoft's supported path for requiring MFA at enrolment targets the Microsoft Intune Enrollment app and combines Require multifactor authentication with Require device to be marked as compliant under Require all the selected controls. That combination is the documented recipe, and the same article states that if a device is not compliant, the user is prompted to make the device compliant before enrolling. The same article also carries a blunt instruction: do not configure device based access rules for Microsoft Intune enrolment.

The cleaner modern option is the Register or join devices user action. Microsoft documents that only two access controls are available with it, Require multifactor authentication and Require authentication strength, and that all others are disabled specifically to prevent conflicts with controls that depend on device registration having already happened. In other words, Microsoft removed the ability to create this particular deadlock on that user action. Note also that Windows Hello for Business and device-bound passkeys are not supported there, because those scenarios require the device to be registered already.

Gotcha: if you use the Register or join devices user action, you must set Entra ID › Devices › Overview › Device Settings › Require Multifactor Authentication to register or join devices with Microsoft Entra to No. Microsoft warns that otherwise the Conditional Access policy with that user action is not properly enforced. Two overlapping MFA requirements is not belt and braces here, it is a documented misconfiguration.

How to verify: read the sign-in log before you edit a policy

Everything above is a hypothesis until the sign-in log confirms it. Verify cloud-side first, because the cloud has the authoritative answer and the device only has symptoms.

1. Find the blocked sign-in in the Entra sign-in logs

entra.microsoft.comEntra IDMonitoring & healthSign-in logs

You need at least the Reports Reader role. Microsoft documents the filters to narrow the noise, and for this investigation four of them do the work.

  1. Filter on Date, scoped to the window when the OOBE attempt failed.
  2. Filter on Username, using the account that was typed at the OOBE sign-in page.
  3. Filter on Resource and look for Microsoft Intune Enrollment and Microsoft Intune.
  4. Filter on Conditional Access and scope it to failures only.

If the failing OOBE screen offered a More Details link, take the correlation ID from it and filter on Correlation ID instead. That takes you straight to the event rather than to a plausible neighbour.

Microsoft Entra admin center — Sign-in logs — activity details (illustrative)
Userfirst.last@contoso.com
ApplicationMicrosoft Intune Enrollment
ResourceMicrosoft Intune Enrollment
StatusFailure
Sign-in error code53000
Device stateUnregistered
Correlation ID{aaaaaaaa-0b0b-1c1c-2d2d-333333333333}
Conditional Access tab — CA-014 Block legacy and unmanaged access: Failure · CA-002 Require MFA all users: Success · CA-021 Require hybrid join (report-only): Report-only failure

Select the Conditional Access tab on the event. Microsoft documents that this tab shows the specific policy or policies that caused the interruption. The Troubleshooting and support tab often states the reason in one line, such as a device that did not meet compliance requirements. Select the ellipsis beside a policy to see, condition by condition, whether the signals collected at sign-in satisfied that policy. Policies apply only when all conditions are satisfied or not configured, so that side-by-side view is where a wrong assumption dies.

2. Match the error code

Microsoft publishes the common Conditional Access sign-in error codes. These four are the ones that show up in enrolment investigations. In a browser they appear with an AADSTS prefix.

CodeError stringWhat it means during OOBE
53000DeviceNotCompliantA compliant-device grant control was evaluated against a device with no compliance record
53001DeviceNotDomainJoinedA hybrid-join grant control was evaluated before, or during, the hybrid join
53002ApplicationUsedIsNotAnApprovedAppAn approved-client-app control caught the enrolment client
53003BlockedByConditionalAccessA block policy caught the enrolment resource. This is the block-all-except-a-list shape

3. Audit the policy set with Graph, read-only

Reading policies one at a time in the portal does not scale, and it is easy to miss the one policy with a stale exclusion list. The companion script for this post reads every Conditional Access policy with a single least-privilege permission and reports the ones that match a deadlock shape. It performs GET requests only.

PowerShell 7 — admin workstation — read-only Graph audit
Connect-MgGraph -Scopes 'Policy.Read.All' -NoWelcome # Policy.Read.All is the documented least-privileged permission for # GET /identity/conditionalAccess/policies. Nothing else is needed. Invoke-MgGraphRequest -Method GET -Uri 'https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies' # Healthy: returns 200 and a 'value' collection. Follow @odata.nextLink for the rest. # Each policy carries conditions.applications.includeApplications / excludeApplications # and grantControls.builtInControls. Those three fields decide the deadlock. .\Get-AutopilotCaDeadlockReport.ps1 -ShowHealthy # The script flags: compliantDevice or domainJoinedDevice grants aimed at the # enrolment apps, block policies whose exclusion list omits them, Terms of Use # reaching the enrolment app, and unsupported controls on the register-or-join action.

Two things to know about the values the script reads, both from the Microsoft Graph reference. The grant control names are block, mfa, compliantDevice, domainJoinedDevice, approvedApplication, compliantApplication, passwordChange and riskRemediation. The only two supported user action strings are urn:user:registersecurityinfo and urn:user:registerdevice. If you are writing your own tooling, use those literals rather than the portal labels.

4. Corroborate on the device

Cloud-side evidence is authoritative, but the device tells you which phase failed. There is a documented event surface for that. All of these live under Event Viewer › Applications and Services Logs › Microsoft › Windows.

Event Viewer — filtered across enrolment channels (illustrative)
LevelIDSource and message
Information1006AAD — PRT acquisition flow started
Information1022AAD — endpoint being accessed: login.microsoftonline.com
Warning1081AAD — server error returned during PRT acquisition
Error1007AAD — PRT acquisition flow ended, final error code logged
Error305User Device Registration — authentication phase error code
Error76DeviceManagement-Enterprise-Diagnostics-Provider — Auto MDM Enroll: Failed
Event IDChannelWhat it tells you
201User Device RegistrationDiscovery phase error and sub-error code
204User Device RegistrationJoin phase error code and HTTP status
220User Device RegistrationWindows could not read the computer object in Active Directory
304 / 305 / 307User Device RegistrationRegistration phase and error code. 305 carries the authentication-phase detail
1006 / 1007AADStart and end of the Primary Refresh Token acquisition flow. 1007 logs the final error code
1022AADThe URL being accessed, immediately before a failure event
1081 / 1088AADServer error code from the Entra authentication service, and from a WS-Trust endpoint
1084AADNetwork stack sub-error, for connectivity rather than policy failures
1144AADThe user principal name that was actually supplied
76DeviceManagement-Enterprise-Diagnostics-Provider/AdminAuto MDM Enroll: Failed, with the Win32 error code
Command Prompt — on the failed device (run elevated)
dsregcmd /status # AzureAdJoined : YES means the join in step 4 completed. # AzureAdPrt : NO with an Attempt Status underneath points at token acquisition, # which is where a Conditional Access interruption lands. # MdmUrl populated but no Intune enrolment means step 5 never finished. Mdmdiagnosticstool.exe -area Autopilot;TPM -cab c:\autopilot.cab # Microsoft's documented collection command for Autopilot troubleshooting. # Healthy: writes a cab. It gathers state, it does not fix anything.
Tip: before you change any policy, run it through report-only mode and the What If tool. Microsoft's own walkthroughs for both the compliance policy and the device-registration MFA policy tell you to create the policy with Enable policy set to Report-only, review the results, and only then move the toggle to On. Report-only results also appear on the sign-in log Conditional Access tab, so you can watch a real OOBE attempt evaluate against a policy that cannot yet hurt it.

The fix: exclusions, user actions and grace periods

Fix the specific shape you confirmed. Do not apply all of these blindly, because each exclusion is a small reduction in coverage and you should be able to justify every one.

Fix 1: exclude the enrolment resources from a restrictive block policy

This is the documented remedy for the block-all-except-a-list shape. You can do it from either portal, and the Conditional Access blade in Intune is the same blade as the one in Entra.

intune.microsoft.comDevicesManage devicesConditional Access
entra.microsoft.comEntra IDConditional AccessPolicies
  1. Sign in as at least a Conditional Access Administrator.
  2. Open the block-style policy that the sign-in log named as the failure.
  3. Select Target resources, then Resources (formerly cloud apps).
  4. Select the Exclude tab, then Select excluded resources.
  5. Search for Microsoft Intune Enrollment and select it.
  6. Search for Microsoft Intune and select it as well. Microsoft names both apps for this remedy.
  7. Select Select, then Save.
  8. Repeat for any Terms of Use policy, because Terms of Use is not supported for the Intune Enrollment app.

If Microsoft Intune Enrollment is not in the picker, you are on a tenant where the service principal was never created. Microsoft documents that an administrator must create it, with app ID d4ebce55-015a-49b5-a083-c84d1797ae8c, in PowerShell or Microsoft Graph. That is a write operation, so do it deliberately and record it in your change log.

Fix 2: move the enrolment MFA requirement to the right place

If your goal is a second factor before a device can join, use the user action rather than bolting device-state controls onto the enrolment app.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
  2. Browse to Entra ID › Conditional Access › Policies and select New policy.
  3. Name the policy to a standard you can search later.
  4. Under Assignments › Users or workload identities › Include, select All users.
  5. Under Exclude, select Users and groups and add your emergency access or break-glass accounts.
  6. Under Target resources › User actions, select Register or join devices.
  7. Under Access controls › Grant, select Grant access, then Require authentication strength, then the built-in Multifactor authentication strength.
  8. Set Enable policy to Report-only and select Create.
  9. Review the report-only results, then move the toggle to On.

Then turn off the overlapping tenant-wide setting, or the policy will not be enforced properly.

entra.microsoft.comEntra ID › DevicesOverview › Device settingsRequire MFA to register or join = No
Watch out: if you use external authentication methods, Microsoft warns that they are currently incompatible with authentication strength, and that you should use the Require multifactor authentication grant control instead. Pick the control that matches your authentication estate, not the newest one.

Fix 3: give device-state compliance rules room to become true

Two adjustments, both documented, both on the Intune side rather than the Conditional Access side.

intune.microsoft.comDevicesCompliancePolicies
  1. Open the Windows compliance policy that evaluates BitLocker or Secure Boot.
  2. Set a grace period on the actions for noncompliance. Microsoft notes the grace period is needed because BitLocker and Secure Boot state are not captured until the device reboots, and that it can be as short as 0.25 days.
  3. Assign your compliance policies to device groups rather than user groups. Microsoft's documented fix for the ESP timeout is exactly this: target compliance policies to devices so that compliance can be determined before the user signs in.
  4. If you track store apps on the ESP, use offline licensing for them, so the client does not have to check with the Microsoft Store before compliance is known.
Context: Conditional Access has no Group Policy path and no configuration service provider. It is a cloud-only policy engine evaluated at token issuance, so there is nothing to set on the device, no registry value to pre-seed, and no OMA-URI to deploy. Everything in this section is a portal or Graph change. That also means a device already stuck at OOBE will pick up the corrected policy on its next attempt, with no local action needed.

Fix 4: the hybrid join case

There is no exclusion that makes the hybrid compliance window disappear, because the N/A state is a real reflection of the sync order. Microsoft gives two options: a user signs in to the device, which lets Intune sync the hybrid device ID, or you modify the device-based policy. If you are building new devices, Microsoft's standing recommendation is to deploy them cloud-native with Microsoft Entra join rather than hybrid join, including through Autopilot.

Proof it worked: a clean audit and a quiet sign-in log

Three pieces of evidence, in the order you should collect them.

First, the audit script comes back with nothing to say about the policy you fixed. The block below is illustrative output, hand-composed to show the report format; it is not a capture from a live tenant.

Get-AutopilotCaDeadlockReport.ps1 — illustrative output, not a live capture
============================================================================== Autopilot Conditional Access deadlock audit (read-only) ============================================================================== This script issues GET requests only. Nothing in your tenant is changed. Required Microsoft Graph permission: Policy.Read.All Signed in as : admin@contoso.com Tenant : {aaaaaaaa-0b0b-1c1c-2d2d-333333333333} Policies read: 23 ============================================================================== Findings ============================================================================== [1] CA-021 Require hybrid joined device State : report-only Severity : Report-only Grant controls : domainJoinedDevice (operator: OR) All resources : True Excl. Intune Enrollment : False Why it is risky: - Policy targets All resources with a device-state grant control and already carries application exclusions, but Microsoft Intune Enrollment is not one of them. # Healthy after Fix 1: CA-014 no longer appears, because both enrolment apps # are now on its exclusion list. The remaining item is report-only, so it # cannot break an enrolment today, but fix it before anyone enables it. ============================================================================== Summary ============================================================================== Policies read : 23 Policies with findings : 1 Enabled with findings : 0 Report-only with findings : 1

Second, re-run a real OOBE on a test device and look at the same sign-in event. The Microsoft Intune Enrollment resource should now show Success, and on the Conditional Access tab the previously failing policy should read Not applied because the resource is excluded, rather than Success. Those two outcomes mean different things and it is worth knowing which one you got.

Third, confirm the device landed where it should.

intune.microsoft.comDevices › EnrollmentWindows Autopilot devices
Microsoft Intune admin center — Autopilot deployment (illustrative)
CONTOSO-W11-0417
User-driven · Microsoft Entra joined
Deployment
Success
Enrolled
Yes
Compliance
Compliant
Illustrative. Compliance shows a verdict here only because the device is now enrolled. That ordering is the entire point of this article.

One closing thought on design rather than repair. Microsoft's guidance keeps steering toward a small number of broad policies with no resource exclusions, and toward doing enrolment-time enforcement with the mechanism built for it. The deadlock is almost always a symptom of an exclusion list that grew organically, one exception at a time, until nobody could describe what it covered. If your audit script found several findings rather than one, the fix is probably not another exclusion. It is fewer, simpler policies.

References

Microsoft official documentation

Community deep-dives

AuthorArticleWhy it is worth reading
Simon Skotheimsvik (MSEndpointMgr)Troubleshooting Windows First Sign-in Restore when Conditional Access gets in the wayThe same deadlock in a different guise: a compliant-device policy across all cloud apps silently breaking a feature that runs before compliance exists.
Maurice Daly and Sandy Zeng (MSEndpointMgr)Autopilot and the perceived tenant security riskArgues that identity controls, not Autopilot restrictions, are the real boundary. Useful context for deciding which exclusions you can live with.

Companion script

Get-AutopilotCaDeadlockReport.ps1 reads every Conditional Access policy in the tenant and reports the ones matching a deadlock shape. It is GET-only, uses the single delegated permission Policy.Read.All, runs on Windows PowerShell 5.1 and PowerShell 7, and aborts with a loud message rather than reporting a clean result after a failed query.

PowerShell Scripts — Conditional Access Deadlock Audit

Download it from Imran76Awan/Windows-Autopilot-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.

Get-AutopilotCaDeadlockReport.ps1 — finds CA policies matching the shapes that genuinely block enrolment
View all scripts on GitHub
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Autopilot
Corporate or personal? How Autopilot devices get their ownership…
Intune stamps device ownership at enrolment time based purely on the enrolment route.…
Autopilot
Reading AutopilotConfigurationFile.json: Every Documented Field…
Microsoft documents exactly nine properties for AutopilotConfigurationFile.json, and none…
Autopilot
Windows Autopilot MDM Log Collection: Complete Troubleshooting…
Every command, registry key, event ID, and error code for diagnosing Windows Autopilot…