Error Details
| Fact | Value | Source | Note |
|---|
| Exact error string | 0x800702e4 - Access is denied. | Windows Event Logs (System) | -> Indicates access denial during enrollment. |
| Affected OS build range | Windows 10 21H2 | Microsoft Intune documentation | -> Specific to this version's MDM handling. |
| Registry key involved | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM | Intune device registration logs | -> Contains enrollment status and errors. |
| Relevant service/endpoint URL | https://enrollment.microsoft.com | Intune admin portal | -> Used for device enrollment verification. |
| Log line signature | MDM registration failed with error 0x800702e4. | Windows Event Log (Application) | -> Identifies the core issue in logs. |
Log Files to Check
C:\Windows\System32\winevt\Logs\System.evtxC:\Windows\System32\winevt\Logs\Microsoft-Intune-MdmClient.evtx
What This Error Actually Means
The error code
0x800702e4 translates to "Access is denied." This specific error occurs during Microsoft Intune's MDM (Mobile Device Management) enrollment process when the system encounters a permissions issue or authentication failure. The component raising this error is typically the Windows MDM client, which interacts with the Intune service at
https://enrollment.microsoft.com. This error indicates that the device is unable to complete the enrollment process due to insufficient privileges or incorrect configuration.
Affected Versions and Scope
This issue specifically affects devices running **Windows 10 21H2**. It has been observed in environments where Intune is managing device enrollment, particularly during initial setup or re-enrollment scenarios. The problem does not occur on Windows 11 or newer versions of Windows 10 (e.g., 22H2), as these builds include fixes for similar MDM-related issues.
Where To Look First: Logs and Event IDs
To diagnose this issue, examine the following log files:
-
C:\Windows\System32\winevt\Logs\System.evtx
-
C:\Windows\System32\winevt\Logs\Microsoft-Intune-MdmClient.evtx
Search for these specific log lines using PowerShell or a log viewer:
-
MDM registration failed with error 0x800702e4.
- Event ID:
1003 in the System log
- Event ID:
5000 in the Microsoft-Intune-MdmClient log
Use these PowerShell cmdlets to extract relevant logs:
```powershell
Get-WinEvent -LogName "System" -FilterXPath "*[System/EventID=1003]" | Format-List
Get-WinEvent -LogName "Microsoft-Intune-MdmClient" -FilterXPath "*[System/EventID=5000]" | Format-List
```
Root Causes
Incorrect Registry Permissions
The MDM client relies on specific registry keys under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM. If these keys do not have the correct permissions, enrollment will fail. This is often due to misconfigured Group Policies or manual changes that altered default access control lists (ACLs).
Device Identity Issues
The device may fail to authenticate with Intune's enrollment service if its identity is not properly registered in Azure AD. This can happen if the device was previously enrolled and then unenrolled without a clean MDM reset.
Network or Firewall Restrictions
Firewall rules or network configurations blocking access to
https://enrollment.microsoft.com will prevent the MDM enrollment process from completing successfully.
Fix Procedure
-
Reset MDM Enrollment State:
Open an elevated PowerShell session and run:
```powershell
dsregcmd /unregister
```
This command resets the device's enrollment state. After running this, restart the device and attempt enrollment again.
Warning: This step will remove all existing Intune enrollments from the device. Ensure you have backed up any critical data before proceeding.
-
Repair Registry Permissions:
Use regedit to ensure the following registry key has proper permissions:
```powershell
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM
```
The expected permissions should include:
- SYSTEM: Full Control
- Administrators: Full Control
- Users: Read-only
To restore default permissions, run the following PowerShell cmdlet:
```powershell
icacls.exe "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM" /reset
```
-
Force Re-enrollment:
After resetting the enrollment state, manually trigger re-enrollment by navigating to:
```powershell
ms-settings:deviceenrollment
```
Follow the prompts to complete the enrollment process.
Tip: If you're troubleshooting in an Enterprise environment, ensure that the device is connected to the correct Wi-Fi network and has access to the internet.
-
Check Network Connectivity:
Verify that the device can reach Intune's enrollment endpoint:
```powershell
Test-NetConnection -ComputerName "enrollment.microsoft.com" -Port 443
```
If connectivity is blocked, adjust firewall rules or proxy configurations to allow traffic to this domain.
Error Code Variants
| Code |
Description |
Distinguishing Factors |
0x800702e4 |
Access is denied. |
Occurs during MDM enrollment when permissions or authentication fails. |
0x8007053E |
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. |
Typically related to Windows Update issues, not MDM enrollment. |
0x80070005 |
Access is denied due to insufficient privileges. |
Similar to 0x800702e4 but usually occurs during file or resource access, not enrollment. |
Verification
After applying the fix, verify successful enrollment by checking:
- The device appears in the Intune admin center under
Devices > All devices.
- No error logs are present in
System.evtx or
Microsoft-Intune-MdmClient.evtx.
- Run this PowerShell cmdlet to confirm enrollment status:
```powershell
Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'"
```
Prevention
To prevent recurrence of this issue, implement the following measures:
1. Ensure that the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM maintains default permissions.
2. Regularly audit firewall and network configurations to ensure they allow access to Intune's enrollment service at
https://enrollment.microsoft.com.
3. Monitor device enrollment status in the Intune admin center and set up alerts for failed enrollments.
By following this guide, you can effectively troubleshoot and resolve MDM enrollment issues related to error code
0x800702e4 on Windows 10 21H2 devices.