Home › Microsoft Intune › 0x87D200B9

Microsoft Intune · 0x87D200B9 · Windows 10 / Windows 11

Microsoft Intune MDM Enrollment Error 0x87D200B9 - Windows 10/11

The enrollment certificate failed to renew due to expiration or clock skew. Fix by forcing re-enrollment or correcting the device time.

Error Details

FactValueSourceNote
Exact error stringEnrollment certificate renewal failed. Error: 0x87D200B9Event Viewer - Microsoft/Windows/DeviceManagement-Enterprise-Diagnostics-Provider/Admin-> Event ID 76 and 72
Affected OS build rangeWindows 10 / Windows 11Microsoft Intune documentation-> Applies to all supported versions
Registry key involvedHKLM\SOFTWARE\Microsoft\EnrollmentsWindows Registry-> Contains enrollment state and UPN
Relevant service/endpoint URLsts.manage.microsoft.com:443Intune MDM renewal endpoint-> Required for certificate renewal
Log line signatureEnrollmentState=6 (pending re-enrollment)Registry and Intune admin center-> Indicates device needs to renew enrollment

Log Files to Check

What This Error Actually Means

The error code 0x87D200B9 (AGENT_CERT_RENEW_FAILURE) indicates that the Microsoft Intune Management Extension or MDM client failed to renew its enrollment certificate. This is critical because the certificate is essential for maintaining communication between the device and the Intune service. When renewal fails, the device remains enrolled in Intune but cannot receive new configuration profiles or policy updates, leading to compliance failures. The error originates from the DeviceManagement-Enterprise-Diagnostics-Provider component, which logs detailed information about enrollment and certificate lifecycle events.

Affected Versions and Scope

This issue affects devices running Windows 10 and Windows 11 operating systems enrolled in Microsoft Intune for MDM management. It is particularly relevant to organizations using Azure Active Directory (Azure AD) or Microsoft Entra ID for device enrollment. The error can occur across all supported builds of Windows 10 and 11, though newer builds may include additional mitigations or logging improvements. Devices managed via other platforms (e.g., macOS, iOS, Android) are not affected by this specific error code.

Where To Look First: Logs and Event IDs

To diagnose the issue, examine the following logs and events: 1. **Event Viewer**: - Navigate to Event Viewer > Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostics-Provider > Admin. - Filter for Event ID 76 (Enrollment renewal failure) and Event ID 72 (MDM session error). These events will include the exact error code (0x87D200B9) and the certificate thumbprint that failed renewal. 2. **Certificate Store**: - Open the Local Machine certificate store via certlm.msc. - Navigate to Personal > Certificates and look for certificates issued by 'Microsoft Intune MDM Agent CA'. Check their expiration dates. 3. **Registry Enrollment Record**: - Examine the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments. - Each enrolled MDM account has a GUID subkey. Look for the EnrollmentState value, where 1 = enrolled and 6 = pending re-enrollment. 4. **Intune Admin Center**: - Navigate to Devices > select device > Device diagnostic download. - Extract the MDMDiagReport.xml file from the downloaded ZIP archive for detailed enrollment history and certificate status.

Root Causes

1. Expired or Near-Expiry Certificate

The MDM enrollment certificate may have expired or be within its final renewal window (typically 90 days before expiry). Auto-renewal requires continuous internet access to sts.manage.microsoft.com:443. If the device is offline during this period, renewal fails.

2. Clock Skew on Device

A clock skew greater than 5 minutes can cause certificate renewal requests to fail due to TLS validity window checks. This is common in devices with unsynchronized clocks or misconfigured time services.

3. Network Connectivity Issues

The device may be unable to reach the Intune MDM renewal endpoint at sts.manage.microsoft.com:443. This could be due to firewall rules, proxy configurations, or network outages blocking port 443 traffic.

4. Trust Store Update Failure

If Microsoft has rotated its intermediate certificates, devices that have not updated their trusted root stores will fail certificate renewal. This is rare but possible during global CA updates.

Fix Procedure

  1. Force Re-enrollment via Registry: - Open an elevated PowerShell session. - Identify the enrollment GUID: Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Enrollments'. - Set EnrollmentState to 6 (pending re-enrollment): Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Enrollments\' -Name EnrollmentState -Value 6. - Trigger a sync: Invoke-MgDeviceManagementManagedDeviceSyncDevice -DeviceId ""
  2. Manual Re-enrollment: - Disconnect the work account via Settings > Accounts > Access work or school. - Use the Intune admin center to send a new enrollment email: Intune admin center > Devices > Enroll devices > Windows enrollment.
  3. Clock Synchronization: - Ensure W32Time service is running and configured for NTP: Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters' -Name Type -Value 'NTP'. - Restart the service: Restart-Service w32time. - Force sync: w32tm /resync /force.
  4. Network Connectivity Check: - Test connectivity to the renewal endpoint: Test-NetConnection -ComputerName sts.manage.microsoft.com -Port 443. - Ensure no firewall or proxy rules block port 443 traffic.
  5. Warning: Forcing re-enrollment via the registry can dis-enroll devices. Always verify the device's enrollment state in the Intune admin center after making changes.

Error Code Variants

Error CodeDescriptionDistinguishing Factors
0x87D200B9AGENT_CERT_RENEW_FAILURECertificate renewal failure during MDM enrollment
0x87D200BAAGENT_CERT_VALIDATION_FAILEDFailed to validate the existing certificate
0x87D200BBAGENT_CERT_STORE_FAILUREUnable to access or modify the certificate store

Verification

After applying fixes, verify success by: 1. Checking Event Viewer for Event ID 75 (Certificate renewal success). 2. Confirming updated compliance status in the Intune admin center. 3. Verifying certificate expiry date via PowerShell: Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.Issuer -match 'Intune'} | Select-Object NotAfter.

Prevention

Implement these measures to avoid recurrence: 1. **Monitor Certificate Expiry**: Use Intune reports or PowerShell scripts to track certificate lifecycles. Get-MgDeviceManagementManagedDeviceCertificateState -Filter "certificateExpiryDateTime leq now() add 90 days" 2. **Maintain Accurate Time Sync**: - Ensure all devices use reliable NTP sources. - Regularly audit time service configurations. 3. **Network Access Policies**: - Whitelist sts.manage.microsoft.com:443 in firewalls and proxies. - Monitor connectivity to this endpoint using Azure Network Watcher or similar tools. 4. **Trust Store Management**: - Regularly update trusted root certificates on devices. - Monitor Microsoft's public announcements for CA rotations.
Tip: Use the dsregcmd /status command to quickly verify device enrollment status and certificate details without opening Event Viewer or PowerShell.
This comprehensive guide ensures that sysadmins can effectively diagnose, resolve, and prevent the 0x87D200B9 error in Microsoft Intune environments.

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.