Home › Microsoft Intune › 0x80180013

Microsoft Intune · 0x80180013 · Windows 10 / Windows 11

Microsoft Intune Error 0x80180013 - Windows 10/11 MDM Enrollment Failure

The device cannot enroll due to missing Intune license, incorrect MDM scope settings, or stale device records. Fix by assigning the correct license, adjusting MDM scope, or removing stale devices.

Error Details

FactValueSourceNote
Exact error stringSomething went wrong. The access couldn't be granted. Error: 0x80180013Windows Settings > Accounts > Access work or school->
Affected OS buildsWindows 10, Windows 11Microsoft Intune documentation->
Registry key involvedHKLM\SOFTWARE\Microsoft\EnrollmentsRegistry Editor (regedit)Contains AADResourceID and MDMServiceUrl values
Relevant service endpoint URLhttps://mdm.microsoft.comMDM diagnostic logs->
Log line signatureEnrollment failed with error code 0x80180013Windows Event Viewer (Event ID 76)->

Log Files to Check

What This Error Actually Means

The error code 0x80180013 indicates that during Microsoft Intune MDM enrollment, the device failed to complete Auto-MDM enrollment because it was not recognized as eligible by the Intune service. This error is raised by the Windows Device Management (MDM) component when communication with the Intune service fails due to eligibility issues. The error typically appears in the following scenarios:

Affected Versions and Scope

This error affects devices running: It is not specific to any particular version of Intune but rather depends on the tenant's configuration and licensing. The issue arises when the device or user does not meet the eligibility criteria defined in Microsoft Entra ID (formerly Azure AD) for MDM enrollment.

Where To Look First: Logs and Event IDs

To diagnose this error, examine the following log sources:
  1. Windows Event Viewer: Navigate to Event Viewer > Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostics-Provider > Admin. Filter for events with ID 76 (Enrollment failed) and 1 (MDM Enrollment error), specifically looking for the log line: Enrollment failed with error code 0x80180013
  2. MDM Diagnostic Report: Run the following PowerShell command to generate a diagnostic report: mdmdiagnosticstool.exe -area Autopilot;DeviceEnrollment -cab C:\MDMDiag.cab Extract and review logs from the Microsoft-Windows-Provisioning-Diagnostics-Provider channel in the generated C:\MDMDiag.cab file.
  3. Intune Admin Center: Navigate to Devices > Windows > Windows enrollment > Enrollment failures and filter by device or date to find the failed enrollment record. Look for associated AADSTS error codes or sub-errors.
  4. Registry: Check the registry key HKLM\SOFTWARE\Microsoft\Enrollments. Each enrolled account has a GUID subkey containing values like AADResourceID and MDMServiceUrl, which indicate the tenant and MDM endpoint the device attempted to contact.

Root Causes

The error can result from several distinct issues:

1. Missing Intune License on User Account

The Azure AD user's UPN does not have an active Microsoft Intune Plan 1 or EMS/M365 license assigned. Intune requires a valid license to enroll devices in MDM.

2. Incorrect MDM Scope Configuration

In the Entra admin center, the MDM scope is set to "Some" users/devices but the target user/device is not included in the specified groups.

3. Stale Device Records in Azure AD

The device was previously enrolled with a different tenant or account, leaving behind stale records that block re-enrollment under the correct tenant.

4. Conditional Access Policies Blocking Enrollment

A Conditional Access policy is preventing MDM enrollment from devices that are not yet compliant or registered, creating a catch-22 scenario.

5. Terms of Use Not Accepted

If Terms of Use (ToU) are required for enrollment, the user has not accepted them, causing the enrollment to fail.

Fix Procedure

Follow these steps in order:
  1. Verify Intune Licensing: Microsoft 365 admin center > Users > Active users > select user > Licenses and apps. Ensure an Intune or EMS license is assigned and the "Microsoft Intune" service is enabled.
  2. Check MDM Scope Configuration: Navigate to Entra admin center > Identity > Mobility (MDM and WIP) > Microsoft Intune. Confirm the MDM user scope is set to "All" or that the affected user/device is included in the specified groups under "Some".
  3. Remove Stale Device Records: Go to Entra admin center > Identity > Devices > All devices. Search for the device by name or serial number and delete any duplicate or stale records. Use PowerShell to verify remaining devices: Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'"
  4. Review Conditional Access Policies: Use the What If tool in Entra admin center > Protection > Conditional Access > What If. Simulate enrollment using the user account and "Microsoft Intune Enrollment" app to identify blocking policies. Modify or exclude the enrollment app from restrictive policies.
  5. Check Terms of Use Acceptance: Navigate to Entra admin center > Protection > Conditional Access > Terms of use. Verify if a ToU is required and whether the user has accepted it. If necessary, temporarily disable ToU enforcement for enrollment purposes.
  6. Force Re-enrollment: After resolving the above issues, force re-enrollment using: dsregcmd /status to check current status and dsregcmd /unregister followed by a restart to initiate fresh enrollment.
  7. Important: Be cautious when deleting stale device records. Verify the device is truly redundant before removal, as accidental deletion of active enrollments can cause issues.

Error Code Variants

Error CodeDescription
0x80180013Device not recognized as eligible for MDM enrollment
0x8018002DInvalid device or user state (e.g., device already enrolled)
0x80180035Device not found in Azure AD during enrollment

Verification

After applying fixes, verify successful enrollment by:

Prevention

Implement these measures to avoid recurrence:
Quick Tip: Use dsregcmd /status as a quick diagnostic tool to check enrollment status and troubleshoot connectivity issues without digging into logs.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.