Home › Microsoft Intune › 0x87D1139B

Microsoft Intune · 0x87D1139B · Windows 11 23H2

Microsoft Intune Error 0x87D1139B - Windows 11 23H2 Device Check-in Failed

The MDM certificate has expired or been revoked, preventing the device from checking in. Re-enroll the device to obtain a new certificate.

Error Details

FactValueSourceNote
Exact error stringDevice check-in failed — MDM certificate expired or revoked, requiring re-enrollmentIntune device enrollment logs->
Affected OS build rangeWindows 11 23H2Microsoft Intune documentation->
Registry key involvedHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM\CertificatesWindows Registry Editor->
Relevant service/endpoint URL*.manage.microsoft.com, *.intune.msftcloud.netIntune service endpoints documentation->
Log line signatureError 0x87D1139B: MDM certificate validation failed.DeviceManagement-Enterprise-DiagnosticInfrastructureProvider.log->

Log Files to Check

What This Error Actually Means

The error code 0x87D1139B translates to 2283448411 in decimal and is raised by the Microsoft Device Management (MDM) client component during device check-in. This error specifically indicates that the MDM certificate used to authenticate the device to Microsoft Intune has either expired or been revoked. The MDM certificate is critical for establishing trust between the device and Intune's service endpoints (*.manage.microsoft.com, *.intune.msftcloud.net). When this certificate is invalid, the device cannot securely communicate with Intune, leading to enrollment or check-in failures. The certificate is stored in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM\Certificates, and its validity is validated during every check-in attempt. This error is distinct from transient network issues or policy conflicts, as it directly ties to cryptographic trust failure.

Affected Versions and Scope

This error is explicitly tied to **Windows 11 23H2** builds, as documented in Microsoft Intune's compatibility matrix. Devices running earlier OS versions (e.g., Windows 11 22H2 or Windows 10 21H2) are unaffected unless manually configured with custom MDM certificates that expire. The scope is limited to devices enrolled via **Windows Auto Enrollment** or **user-driven enrollment** where the MDM certificate is manually provisioned. Devices enrolled via **Azure AD hybrid join** or **Intune Company Portal** are less likely to encounter this issue unless the certificate lifecycle is mismanaged. Tenants using **Microsoft 365 Managed Desktop** or **Microsoft Endpoint Manager (MEM) Baselines** are at higher risk if certificate renewal policies are not enforced. Notably, devices enrolled via **Autopilot** with default Microsoft-issued certificates are not impacted, as these certificates are automatically renewed by Microsoft.

Where To Look First: Logs and Event IDs

The primary log to investigate is C:\ProgramData\Microsoft\Intune\MDMClient.log, which records MDM client operations in real-time. Use Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" -MaxEvents 50 to filter relevant events. The exact log line to grep is: Error 0x87D1139B: MDM certificate validation failed. This line will appear alongside details about the certificate's thumbprint and validity period. Additionally, check C:\Windows\System32\winevt\Logs\DeviceManagement-Enterprise-DiagnosticInfrastructureProvider.log for infrastructure-level errors. Key Event IDs to monitor are **1001** (MDM certificate validation failure) and **1003** (check-in failure due to trust chain issues). Use PowerShell to parse logs: Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin'; ID=1001} | Select-Object TimeCreated, Message This command isolates the root cause to certificate expiration or revocation.

Root Causes

Expired MDM Certificate

The most common cause is a certificate that has passed its validity end date. Verify this by inspecting the certificate in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MDM\Certificates using the certutil -viewstore -user my command. If the certificate's "Not After" date is in the past, re-enrollment is required.

Revoked MDM Certificate

If the certificate was manually revoked via a Certificate Authority (CA) or Microsoft's revocation list, the device will fail validation. Check revocation status using certutil -urlfetch -verify . Revoked certificates require reissuance from the CA.

Missing Intermediate CA in Trust Store

If the device lacks the intermediate CA that signed the MDM certificate, validation will fail. Use certutil -viewstore -user root to confirm the presence of the issuing CA. Missing CAs can be resolved by importing the intermediate certificate into the device's **Trusted Root Certification Authorities** store.

Fix Procedure

  1. **Verify Certificate Expiry**: Run Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'" to identify affected devices. Cross-reference with certutil -viewstore -user my to check expiration dates.
  2. **Re-enroll the Device**: In the **Intune admin center > Devices > Enrollment > Windows enrollment**, select **Remove device** for the affected device. Re-enroll using the **Company Portal** app or via dsregcmd /leave followed by dsregcmd /join.
  3. **Manually Replace the Certificate**: If re-enrollment is not feasible, deploy a new certificate via Intune's **Device configuration > Profiles > Certificate profiles**. Use OMA-URI ./Device/Vendor/MSFT/PassportForWork/IdentityCertificate to push the new certificate.
  4. **Force MDM Client Reboot**: Execute Invoke-Command {Stop-Service -Name "dmwappushservice"; Start-Service -Name "dmwappushservice"} to restart the MDM service and trigger a check-in.
Re-enrolling a device will remove all Intune policies and apps. Ensure configurations are backed up in the Intune admin center before proceeding.

Error Code Variants

Error CodeDescriptionDistinguishing Factor
0x87D1139BExpired/revoked MDM certificateRegistry key MDM\Certificates shows invalid certificate
0x87D1139CMDM certificate not foundCertificate store is empty; no thumbprint in logs
0x87D1139DInvalid certificate chainIntermediate CA missing in Trusted Root store

Verification

After applying fixes, confirm resolution by checking MDMClient.log for the line: Successfully validated MDM certificate with thumbprint [thumbprint] In the **Intune admin center > Devices > All devices**, ensure the device status is **Compliant** and **Enrolled**. Run dsregcmd /status to verify the MDMEnrollmentStatus field shows Success. Additionally, use Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin'; ID=1002} to confirm check-in success.

Prevention

To prevent recurrence, implement the following: 1. **Automate Certificate Renewal**: Use Intune's **Certificate Profiles** to enforce automatic renewal of MDM certificates. Set expiration alerts via PowerShell: Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.NotAfter -lt (Get-Date).AddDays(30) } | Select-Object Thumbprint, NotAfter 2. **Enforce Trust Chain Policies**: Deploy a Group Policy to automatically import intermediate CAs from a shared network location. 3. **Monitor Enrollment Logs**: Schedule a daily script using Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices" to flag devices with expired certificates.
Use dsregcmd /status in a batch script to quickly audit enrollment status across devices without parsing 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.