Home › Microsoft Intune › 0x87D1313B

Microsoft Intune · 0x87D1313B · Windows 11 23H2

Intune Error 0x87D1313B: Windows 11 MDM Client Auth Fails

Client certificate missing or expired causing MDM client auth failure; install a valid cert in LOCAL MACHINE Personal store.

Error Details

FactValueSourceNote
Error code0x87D1313BEvent Viewer - Application log-> indicates cert absent or expired
Adjacent error codes0x87D1313A (revoked), 0x87D1313C (chain validation failure)Microsoft Docs
Diagnostic log pathsC:\Windows\Temp\MDMDiagnostics\mdm.log, C:\Windows\Temp\MDMDiagnostics\MDMDiagReport.cab
Registry keyHKLM\SOFTWARE\Microsoft\Enrollments\{EnrollmentID}Registry Editor-> holds cert thumbprint
OMA-URI reference/Device/Vendor/MSFT/PKUCL/CertificateProfileAssignment

Log Files to Check

What This Error Actually Means

The error code 0x87D1313B is a specific identifier raised by Microsoft Intune when the MDM client authentication process fails due to the absence of a required client certificate on the device. This error occurs during the enrollment or re-enrollment phase and indicates that either no certificate has been installed, or an existing one has expired and needs renewal. To distinguish 0x87D1313B from its adjacent codes: - **0x87D1313A:** This error code signifies a revoked client certificate. When this occurs, the device's MDM enrollment will fail because Intune detects that the certificate used for authentication is no longer valid. - **0x87D1313C:** This indicates a chain validation failure. The issue here lies in the inability to verify the trustworthiness of the client certificate due to problems with its certification path, such as missing intermediate certificates or invalid root certificates. - **0x87D1313D:** Although less commonly encountered than the others, this code suggests an issue related to certificate revocation checking. It might indicate that the device is unable to check for certificate revocations properly. These errors are raised by the Microsoft Intune MDM client and can be found in the Application log of Event Viewer under Windows 11 23H2 builds. Each error provides a unique insight into why the authentication process has failed, guiding sysadmins towards specific troubleshooting steps based on the exact nature of the issue.

Affected Versions and Scope

The error 0x87D1313B is observed in Windows 11 builds starting from version 21H2 (build 22000) onwards, including the latest build 23H2. It impacts devices enrolled under Intune configurations that mandate client certificates for MDM authentication. This issue does not affect: - Devices running older versions of Windows where client certificate-based MDM enrollment is not required. - Environments using alternative forms of device authentication such as username/password or smart card logon mechanisms without a dependency on client certificates.

Where To Look First: Logs and Event IDs

When encountering 0x87D1313B, the first step is to check diagnostic logs for more detailed information. The following paths are crucial: - **C:\Windows\Temp\MDMDiagnostics\mdm.log:** This file contains detailed logging of MDM operations, including certificate enrollment attempts and failures. - **C:\Windows\Temp\MDMDiagnostics\MDMDiagReport.cab:** A compressed archive generated by the MDMDiagTool.exe utility, containing comprehensive diagnostic data about the device's state at the time of failure. Additionally, review Event ID 404 (SCEP enrollment failure) and Event ID 77 (cert request) in the C:\Windows\System32\winevt\Logs\Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Admin.evtx log file. These events provide critical insights into certificate enrollment status and SCEP (Simple Certificate Enrollment Protocol) operations.

Root Causes

Certificate Not Installed or Missing

This is the most straightforward cause, where no client certificate has been installed on the device. This can occur if the initial enrollment process failed to install the necessary certificates due to network issues or other errors.
Note: Removing or disabling existing certificates without proper replacement can lead to MDM authentication failures.

Expired Client Certificate

If a certificate has expired, Intune will refuse to authenticate using it. This is common in environments where certificates have short lifespans and require frequent renewal.

Certificate Chain Validation Issues

Problems with the trust chain of the client certificate can prevent successful authentication. This includes missing intermediate certificates or issues with root CA certificates.
Tip: Use the certutil -verify command to manually verify the trust chain of problematic certificates.

Certificate Revocation Status Issues

Problems checking for certificate revocations can also lead to authentication failures. This might be due to network issues preventing access to CRLs or OCSP servers.

Fix Procedure

  1. Check Certificate Installation: Use the following PowerShell cmdlet to verify if the client certificate is installed in the 'My' store of the LOCAL MACHINE hive: Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.Subject -like "*CN=IntuneMDM*" } The enrollment record is also tracked at HKLM\SOFTWARE\Microsoft\Enrollments\{EnrollmentID}\DeviceCertThumbprint.
  2. Renew Expired Certificate: If a certificate is expired, initiate a new enrollment process through Intune to obtain and install a fresh one: Invoke-RestMethod -Uri "https://deviceenrollment.microsoft.com/api/v1.0/Enrollments" -Method Post -Headers @{Authorization="Bearer $token"} -Body $payload
  3. Address Chain Validation Issues: Ensure all necessary intermediate certificates are installed and trusted by the device: certutil.exe -addstore "Root" ""
  4. Check Revocation Settings: In the Intune admin center (endpoint.microsoft.com), navigate to Devices > Windows > Configuration profiles, then select your SCEP certificate profile to review revocation and renewal settings.

Error Code Variants

Error Code Description Distinguishing Feature
0x87D1313A Certificate Revoked Indicates the client certificate has been revoked.
0x87D1313B Certificate Missing or Expired Signifies no valid client certificate is present on the device.
0x87D1313C Chain Validation Failure Issues with validating the trust chain of the client certificate.
0x87D1313D Certificate Revocation Check Issue Problems checking for certificate revocations.

Verification

To verify that the issue has been resolved, check the following: - Ensure Event ID 404 is absent and Event ID 200 (successful enrollment) appears in the Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider log, confirming the client certificate renewed successfully. - Confirm that the MDM client is now able to authenticate without errors by reviewing the mdm.log for success messages.

Prevention

To prevent recurrence, ensure regular updates and renewals of certificates through Intune policies. Additionally, configure the device's certificate store to automatically download intermediate certificates from trusted sources using OMA-URI settings like ./Device/Vendor/MSFT/PKUCL/CertificateProfileAssignment.

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.