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.
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.
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:
| Step | What the device does | Identity state at that moment |
|---|---|---|
| 1 | Connects to a network and downloads its Autopilot profile | No device identity, no user token |
| 2 | Checks for critical OOBE updates and may restart | Still anonymous to your tenant |
| 3 | Prompts for Microsoft Entra credentials with your branding | First interactive user sign-in of the device life |
| 4 | Joins Microsoft Entra ID, or Active Directory, per the profile | Device object created, no compliance record |
| 5 | Enrols in Intune, via MDM auto-enrolment during the join | Now managed, compliance not yet evaluated |
| 6 | Shows the Enrollment Status Page, if configured | Compliance evaluation begins |
| 7 | Signs the user in to Windows with the credentials from step 3 | Primary Refresh Token issued |
| 8 | Shows the ESP again for user-targeted work | Compliance 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 name | Application ID | Why it matters at OOBE |
|---|---|---|
| Microsoft Intune Enrollment | d4ebce55-015a-49b5-a083-c84d1797ae8c | The enrolment resource itself. Microsoft documents this app ID in the guidance for requiring multifactor authentication at enrolment. |
| Microsoft Intune | 0000000a-0000-0000-c000-000000000000 | Ongoing management and sync. Microsoft documents excluding this app ID from policies requiring MFA so that device sync can use user credentials. |
| Windows Store for Business | 45a330b1-b1ec-4cc1-9161-9f03992aa49f | Microsoft suggests excluding this app from device compliance policies if you use Subscription Activation to step up a Windows edition. |
| Windows Azure Active Directory | 00000002-0000-0000-c000-000000000000 | Included in All resources but individually targetable. Directory reads during sign-in map here. |
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.
| Shape | What breaks | Documented remedy |
|---|---|---|
| Block all apps except an exclusion list, plus a second policy requiring compliance for the apps on that list | The enrolment resources are not on the list, so the block policy catches them | Put Microsoft Intune Enrollment and Microsoft Intune on the exclusion list of the block policy |
| Any policy requiring Terms of Use that reaches the enrolment app | Terms of Use is not supported for the Intune Enrollment app | Exclude the Intune Enrollment app from every Terms of Use policy |
| Device-based policy blocking on compliance during a hybrid Autopilot deployment | Hybrid compliance shows N/A until a user signs in; Intune syncs the hybrid device ID only after that sign-in | Have 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 period | Those states are not captured until the device reboots, so they cannot be used yet | Give 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.
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.
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
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.
- Filter on Date, scoped to the window when the OOBE attempt failed.
- Filter on Username, using the account that was typed at the OOBE sign-in page.
- Filter on Resource and look for Microsoft Intune Enrollment and Microsoft Intune.
- 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.
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.
| Code | Error string | What it means during OOBE |
|---|---|---|
| 53000 | DeviceNotCompliant | A compliant-device grant control was evaluated against a device with no compliance record |
| 53001 | DeviceNotDomainJoined | A hybrid-join grant control was evaluated before, or during, the hybrid join |
| 53002 | ApplicationUsedIsNotAnApprovedApp | An approved-client-app control caught the enrolment client |
| 53003 | BlockedByConditionalAccess | A 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.
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 ID | Channel | What it tells you |
|---|---|---|
| 201 | User Device Registration | Discovery phase error and sub-error code |
| 204 | User Device Registration | Join phase error code and HTTP status |
| 220 | User Device Registration | Windows could not read the computer object in Active Directory |
| 304 / 305 / 307 | User Device Registration | Registration phase and error code. 305 carries the authentication-phase detail |
| 1006 / 1007 | AAD | Start and end of the Primary Refresh Token acquisition flow. 1007 logs the final error code |
| 1022 | AAD | The URL being accessed, immediately before a failure event |
| 1081 / 1088 | AAD | Server error code from the Entra authentication service, and from a WS-Trust endpoint |
| 1084 | AAD | Network stack sub-error, for connectivity rather than policy failures |
| 1144 | AAD | The user principal name that was actually supplied |
| 76 | DeviceManagement-Enterprise-Diagnostics-Provider/Admin | Auto MDM Enroll: Failed, with the Win32 error code |
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.
- Sign in as at least a Conditional Access Administrator.
- Open the block-style policy that the sign-in log named as the failure.
- Select Target resources, then Resources (formerly cloud apps).
- Select the Exclude tab, then Select excluded resources.
- Search for Microsoft Intune Enrollment and select it.
- Search for Microsoft Intune and select it as well. Microsoft names both apps for this remedy.
- Select Select, then Save.
- 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.
- Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
- Browse to Entra ID › Conditional Access › Policies and select New policy.
- Name the policy to a standard you can search later.
- Under Assignments › Users or workload identities › Include, select All users.
- Under Exclude, select Users and groups and add your emergency access or break-glass accounts.
- Under Target resources › User actions, select Register or join devices.
- Under Access controls › Grant, select Grant access, then Require authentication strength, then the built-in Multifactor authentication strength.
- Set Enable policy to Report-only and select Create.
- 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.
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.
- Open the Windows compliance policy that evaluates BitLocker or Secure Boot.
- 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.
- 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.
- 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.
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.
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.
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
- Windows Autopilot known issues — the Device-based Conditional Access policies section, which names the enrolment app exclusions, the Terms of Use limitation, the hybrid N/A compliance window and the BitLocker grace period.
- How to require device compliance with Conditional Access — the note stating that the compliant-device control does not block Intune enrolment, and the Subscription Activation exclusion.
- Require multifactor authentication for Intune device enrollment — the documented app ID for Microsoft Intune Enrollment, and the note that the service principal is not created automatically for new tenants.
- Troubleshooting sign-in problems with Conditional Access — sign-in log navigation, the Conditional Access tab, audience reporting, and error codes 53000 to 53009.
- Targeting resources in Conditional Access policies — the Register or join devices user action and the controls it does and does not support.
- Require MFA for device registration — the supported walkthrough, and the warning about the tenant-wide device setting.
- Windows Autopilot user-driven mode — the documented OOBE sequence used in the table above.
- Troubleshooting Windows device enrollment problems in Intune — the ESP timeout caused by a compliant-device policy across all cloud apps, and Event ID 76.
- Troubleshoot auto-enrolling existing Configuration Manager devices in Intune — the documented app ID for Microsoft Intune and the MFA exclusion guidance.
- Troubleshoot Microsoft Entra hybrid joined devices — the User Device Registration and AAD event IDs in the catalog above.
- List Conditional Access policies (Microsoft Graph) — the endpoint and the Policy.Read.All least-privileged permission the companion script uses.
- conditionalAccessGrantControls resource type — the exact builtInControls enumeration values.
Community deep-dives
| Author | Article | Why it is worth reading |
|---|---|---|
| Simon Skotheimsvik (MSEndpointMgr) | Troubleshooting Windows First Sign-in Restore when Conditional Access gets in the way | The 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 risk | Argues 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.
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.