Fix it now
These are refusals, not failures: the service said no before anything was configured. 0x8018002b means the user’s UPN suffix is not routable, or MDM user scope is set to None. 0x80180014 means Windows MDM enrolment is disabled in the tenant. Nothing on the device fixes either.
dsregcmd /status
MdmDiagnosticsTool.exe -area DeviceEnrollment -cab C:\Temp\mdm.cab
- Read the user’s UPN. A suffix like
.localthat is not a verified domain in the tenant produces 0x8018002b, and the fix is in Active Directory Users and Computers, not on the device. - Check MDM user scope: Intune admin centre, Devices, Device onboarding, Enrollment, Windows tab, Automatic Enrollment. Set to None it refuses everyone.
- For 0x80180014, check the device platform restriction under Devices, Device onboarding, Enrollment and confirm Windows (MDM) is allowed.
- Read
dsregcmd /status. AzureAdPrt: NO with a TenantId that is not yours means the device is carrying stale join data from a previous tenant. - Open the cab and the DeviceManagement-Enterprise-Diagnostic-Provider Admin log in Event Viewer; Event ID 76 carries the actual Win32 code.
Automatic MDM enrolment is a premium Entra feature and needs Microsoft Entra ID P1 or P2 in addition to Intune.
If enrolment now completes you can stop here. If not, the next section separates the five refusals, which have five different causes.
Why it happens
Every code in this article is the enrolment service declining a request rather than a client-side failure. That is why nothing you do on the device helps: the device asked, and the answer was no. What varies is who said no and why, and the five codes here point at five genuinely different decisions.
0x8018002b has two documented causes, neither of them a licence. The first is the user’s UPN: if it carries an unverified or non-routable suffix, such as joe@contoso.local, automatic enrolment fails, and Microsoft’s fix is to change the suffix in Active Directory Users and Computers and force a delta sync. The second is MDM user scope set to None, which switches automatic enrolment off for everyone. A third documented cause appears on a separate Microsoft page: a device that was previously joined to a different tenant and did not leave cleanly keeps that tenant’s values under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CloudDomainJoin\TenantInfo\<TenantId>, so no primary refresh token is issued and enrolment cannot proceed.
0x80180014 surfaces as “Your organization does not support this version of Windows”, which reads like a hardware problem and is not one. Microsoft’s cause is that Windows MDM enrolment is disabled in the tenant, fixed in the device platform restriction by allowing Windows (MDM). The underlying constant, MENROLL_E_DEVICENOTSUPPORTED, is defined as a platform or version not being supported, which is why the message is worded the way it is.
The remaining three are each specific. 0x80180026 is MENROLL_E_DEVICE_MANAGEMENT_BLOCKED – MDM blocked, possibly by Group Policy – and Microsoft names the common instance: a device being joined to Entra ID with automatic MDM enrolment on while the legacy Intune PC client agent is still installed. 0x8018002a is enforced multifactor authentication stopping the Configuration Manager client agent enrolling with the signed-in user’s credentials, logged alongside 0xCAA2000C and AADSTS50076. 0x80180031 is MENROLL_E_MDM_NOT_CONFIGURED: MDM is not configured at all.
The UPN suffix is not routable
You have this one if 0x8018002b, and the affected users sign in as something@yourdomain.local or another suffix that is not a verified domain in the tenant.
- Open Active Directory Users and Computers (
dsa.msc) and select the affected users. - On the Account tab, choose a valid, verified UPN suffix such as contoso.com from the User logon name drop-down. Multiple users can be changed together from the Action menu.
- Force a delta sync:
Import-Module ADSyncthenStart-ADSyncSyncCycle -PolicyType Delta. - Have the user sign out and back in, then retry enrolment.
MDM user scope is set to None
You have this one if 0x8018002b for every user, on every device, with nothing in common except the tenant.
- In the Intune admin centre open Devices, Device onboarding, Enrollment, the Windows tab, then Automatic Enrollment.
- Set MDM user scope to All, or to Some with the groups that should enrol automatically.
- Set the WIP user scope to None, or make sure the same users are not in both scopes.
- Confirm the tenant has Microsoft Entra ID P1 or P2, which automatic enrolment requires.
Windows MDM enrolment is disabled for the platform
You have this one if 0x80180014, with the message “Your organization does not support this version of Windows”.
- Open Devices, Device onboarding, Enrollment in the Intune admin centre and select the device platform restriction.
- Edit the platform settings and set Windows (MDM) to Allow.
- Review and save, then retry enrolment on the device.
Check whether personally owned devices are blocked separately. A restriction that allows Windows but blocks personally owned devices produces the same refusal for a user’s own laptop.
Multifactor authentication is enforced
You have this one if 0x8018002a on hybrid joined devices, with 0xCAA2000C and AADSTS50076 in the Microsoft Entra ID operational log.
- Set MFA to Enabled rather than Enforced for the affected users, which is Microsoft’s documented remedy.
- Or use Trusted IPs to suspend MFA for the enrolment network while devices are being onboarded.
- Retry enrolment and confirm Event ID 76 stops recording 0x8018002a.
This is worth planning rather than improvising. Weakening MFA is a real change; do it deliberately, for a defined window, and put it back.
The device is carrying a previous tenant’s join data
You have this one if 0x8018002b, and dsregcmd /status shows AzureAdPrt: NO with a TenantId and AuthCodeUrl that belong to somebody else.
- Run
dsregcmd /leavefrom an elevated prompt on the device. - Delete the device in Microsoft Entra ID, unjoin it from the on-premises domain and delete the computer object.
- Rejoin the domain, run
Start-ADSyncSyncCycle -PolicyType Delta, and confirmdsregcmd /statusshows AzureAdJoined and DomainJoined as YES. - Sign out and back in to obtain a PRT, confirm AzureAdPrt: YES, then run
gpupdate /force.
Full reference
What each refusal actually says
| Code | Constant or message | Documented cause |
|---|---|---|
0x8018002b |
Auto MDM Enroll: Failed, Event ID 76 | Non-routable UPN suffix, or MDM user scope set to None |
0x80180014 |
MENROLL_E_DEVICENOTSUPPORTED | Windows MDM enrolment disabled by a device platform restriction |
0x80180026 |
MENROLL_E_DEVICE_MANAGEMENT_BLOCKED | MDM blocked, e.g. by Group Policy; commonly the legacy Intune PC agent still installed |
0x8018002a |
Auto MDM Enroll: Failed, Event ID 76 | Multifactor authentication set to Enforced |
0x80180031 |
MENROLL_E_MDM_NOT_CONFIGURED | Mobile Device Management is not configured |
Where the evidence is
- Event Viewer, Applications and Services Logs, Microsoft, Windows, DeviceManagement-Enterprise-Diagnostic-Provider, Admin. Event ID 76 is the automatic enrolment result and carries the Win32 code.
MdmDiagnosticsTool.exe -area DeviceEnrollment -cab C:\Temp\mdm.cabcollects the same logs plus configuration state in one file.dsregcmd /statusfor join state, tenant identity and whether a primary refresh token exists.- The Microsoft Entra ID operational log on the device, where the AADSTS code behind a CAA-prefixed failure appears.
Removing the legacy client
0x80180026 has a specific and slightly dated cause: a machine carrying the old Intune PC software client agent while automatic MDM enrolment is enabled. Microsoft gives two remedies – uninstall the legacy agent from the computer, or set MDM user scope to None – and only the first is a real fix. If you are finding that agent on machines in 2026, it came in on an image; check the image rather than the machine.
What a missing licence actually looks like
This matters because it is the thing people assume is happening. An unlicensed user does not get any of the five codes above. Microsoft documents the unlicensed case separately, as the message “This account is not allowed on this phone”, with the remedy “Assign a valid license to the user”. If your enrolment failure shows a hex code from this article, licensing is not your problem and buying seats will not clear it.
When all five are ruled out
- Check whether Conditional Access is refusing the sign-in that precedes enrolment. A policy requiring a compliant device can block the very enrolment that would make the device compliant; exclude the enrolment flow.
- Check the Entra device settings that govern who may join devices at all, which can be restricted to selected users.
- Check the enrolment device limit for the user, which is separate from the platform restriction.
- Confirm the MDM terms of use URL is correct. Microsoft documents “Looks like the MDM Terms of Use endpoint is not correctly configured” as its own failure with its own fix.
- On a co-managed device, confirm the workload has actually been moved to Intune, and check the Configuration Manager client’s own logs rather than only the Windows ones.
When a licence is the actual fix
Read this one before you order anything. None of the five codes in this article is a licensing refusal – they are a UPN suffix, an MDM scope, a platform restriction, enforced MFA and MDM not being configured, and every one of them is fixed with a setting rather than a purchase. Microsoft documents the unlicensed case separately, with a different message and the explicit instruction to assign a valid licence to the user, so if your error is a hex code from the table above, licensing is not the blocker. Where a licence genuinely is missing, Microsoft Intune Plan 1 covers device enrolment and management standalone, and automatic enrolment additionally requires Microsoft Entra ID P1 or P2. Before ordering either, check what your users already hold: Intune and Entra ID P1 are bundled inside several Microsoft 365 plans and paying twice for the same entitlement is a common and avoidable mistake. Arco will check your existing subscriptions and supply only the licences that are actually missing.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x8018002b |
Logged as “Auto MDM Enroll: Failed” in Event ID 76. Two documented causes: the UPN carries an unverified or non-routable suffix such as .local, or MDM user scope is set to None. A third: stale CloudDomainJoin data from a previous tenant, so no PRT is issued | Microsoft Learn |
0x80180014 |
MENROLL_E_DEVICENOTSUPPORTED. Shown as “Your organization does not support this version of Windows”; the cause is Windows MDM enrolment disabled by a device platform restriction | Microsoft Learn |
0x80180026 |
MENROLL_E_DEVICE_MANAGEMENT_BLOCKED – “MDM was blocked, possibly by Group Policy or the SetManagedExternally function”. Commonly the legacy Intune PC client agent still installed on a device being Entra joined | Microsoft Learn |
0x8018002a |
Hybrid joined devices fail to enrol when multifactor authentication is set to Enforced, which stops the Configuration Manager client agent enrolling with the signed-in user’s credentials; logged with 0xCAA2000C and AADSTS50076 | Microsoft Learn |
0x80180031 |
MENROLL_E_MDM_NOT_CONFIGURED – “Mobile Device Management (MDM) is not configured” | Microsoft Learn |
Confirm the fix worked
- The affected user’s UPN suffix is a verified domain in the tenant.
- MDM user scope under Devices, Device onboarding, Enrollment, Windows, Automatic Enrollment covers that user.
- The device platform restriction allows Windows (MDM) for the ownership type the user has.
dsregcmd /statusshows AzureAdJoined YES and AzureAdPrt YES with your tenant’s TenantId.- Event ID 76 in the DeviceManagement-Enterprise-Diagnostic-Provider Admin log records a successful automatic enrolment.
Questions people ask about this
Is 0x8018002b a licensing error?
No. Microsoft documents two causes for it: a UPN suffix that is not routable, and MDM user scope set to None. An unlicensed user gets a different message entirely – “This account is not allowed on this phone” – with the instruction to assign a licence.
Why does 0x80180014 say Windows is not supported?
Because the underlying constant, MENROLL_E_DEVICENOTSUPPORTED, is the generic platform-not-supported error and the enrolment client shows its standard text. The actual cause in Intune is that Windows MDM enrolment is turned off for that platform in the tenant.
Do we have to weaken MFA to clear 0x8018002a?
Microsoft’s documented remedies are to set MFA to Enabled rather than Enforced, or to suspend it temporarily using Trusted IPs while devices enrol. Both are real security changes. Do them for a defined window as part of a planned onboarding, and put them back afterwards.
The device was used at another company. Does that matter?
Yes. If it did not leave the previous tenant cleanly, the old tenant’s values remain under CloudDomainJoin\TenantInfo and no primary refresh token is issued, which surfaces as 0x8018002b. dsregcmd /leave and a clean rejoin is the documented fix.
Where does the actual error code appear on the device?
Event ID 76 in Applications and Services Logs, Microsoft, Windows, DeviceManagement-Enterprise-Diagnostic-Provider, Admin. It records “Auto MDM Enroll: Failed” with the Win32 code, which is what you match against the table in this article.
