Intune and Windows Autopilot

Intune auto-enrollment error 0x8018002b: Auto MDM Enroll failed, and how to fix it

Error 0x8018002b means Group Policy auto-enrollment into Intune failed, usually because of a .local UPN suffix or an MDM user scope set to None. Fixes in order.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

0x8018002b is reported when a domain-joined Windows device fails to enroll itself into Microsoft Intune through Group Policy auto-enrollment. Microsoft's Intune enrollment troubleshooting article shows it in two places. In Task Scheduler, under Microsoft, Windows, EnterpriseMgmt, the task "Schedule created by enrollment client for automatically enrolling in MDM from Microsoft Entra ID" shows a last run result of "Auto MDM Enroll: Failed (Unknown Win32 Error code: 0x8018002b)". In Event Viewer the same failure is logged as Event ID 76 in the DeviceManagement-Enterprise-Diagnostics-Provider Admin log.

Microsoft's separate article on Group Policy auto-enrollment explains how to read this: Event ID 75, "Auto MDM Enroll: Succeeded", means enrollment worked; Event ID 76 with 0x8018002b means it failed; and no 75 or 76 at all means enrollment was never triggered, which is a different problem.

Common causes

Microsoft's enrollment errors article lists two causes for this code:

  • The user's UPN contains an unverified or non-routable domain, such as .local (for example [email protected]).
  • The MDM user scope is set to None, so no user is allowed to auto-enroll.

Microsoft's auto-enrollment checklist adds related settings that also block enrollment: no valid Intune license for the user, a MAM user scope that takes precedence over the MDM scope, and a device that is not Microsoft Entra hybrid joined.

How to fix it

1. Give the user a routable, verified UPN suffix

On a server with Active Directory Domain Services, open Active Directory Users and Computers (dsa.msc). For one user, open Properties, go to the Account tab and choose a valid UPN suffix such as contoso.com in the drop-down under User logon name. For several users, select them all, open Properties, tick the UPN suffix box on the Account tab and pick the valid suffix. Then wait for the next synchronization, or force a delta sync on the Microsoft Entra Connect server from an elevated PowerShell prompt:

Import-Module ADSync
Start-ADSyncSyncCycle -PolicyType Delta

Microsoft notes that configuring an alternate login ID is another option; review its documentation before choosing it.

2. Set the MDM user scope

Sign in to the Azure portal, select Microsoft Entra ID, then Mobility (MDM and MAM), then Microsoft Intune. Set MDM user scope to All, or to Some and select the groups that may auto-enroll their Windows devices. Set MAM User scope to None. If both Microsoft Intune and Microsoft Intune Enrollment appear under Mobility, Microsoft says to configure the auto-enrollment settings under Microsoft Intune.

3. Verify license and hybrid join

Confirm the user has a valid Intune license. On the device, run the command below and check that AzureAdJoined and DomainJoined both show YES, and that AzureAdPrt in the SSO State section shows YES:

dsregcmd /status

4. Re-run the policy and check the event log again

Make sure the Group Policy setting "Enable automatic MDM enrollment using default Microsoft Entra credentials" (Computer Configuration, Policies, Administrative Templates, Windows Components, MDM) reaches the device, then refresh policy and wait for the task, which runs every 5 minutes for one day. Look for Event ID 75 to confirm success.

gpupdate /force

If nothing works

Microsoft's checklist also asks you to confirm that the device is not enrolled with the classic PC agent, that "Users may join devices to Microsoft Entra ID" is set to All, that the user has not exceeded the maximum number of devices per user, and that Intune enrollment restrictions allow Windows. If the task does not start at all and Event ID 7016 with error 2149056522 appears, the device is enrolled in another MDM and must be unenrolled first. For an Autopilot-specific failure, see the Windows Autopilot error codes guide.

What we checked

Two Microsoft Learn articles were read on 2026-11-21. Troubleshooting Windows device enrollment problems in Intune shows 0x8018002b in Task Scheduler and as Event ID 76, and gives the UPN suffix and MDM user scope causes with their fixes. Troubleshoot Windows 10 Group Policy auto-enrollment in Microsoft Intune explains Event IDs 75 and 76, the verification checklist, the scheduled task and gpupdate /force. The error was not reproduced for this page.

Last checked: 2026-11-21.

Official sources

Questions people ask

What causes Intune error 0x8018002b?

Microsoft lists two causes: the user's UPN contains an unverified or non-routable domain such as .local, or the MDM user scope in Microsoft Entra ID is set to None.

Where do I see 0x8018002b?

As Event ID 76 in Event Viewer under Applications and Services Logs, Microsoft, Windows, DeviceManagement-Enterprise-Diagnostics-Provider, Admin, and as the last run result of the EnterpriseMgmt auto-enrollment task in Task Scheduler.

Does the MAM user scope matter?

Yes. Microsoft's auto-enrollment checklist says to set MAM User scope to None, because otherwise it takes precedence over the MDM scope and causes issues.

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.