Home › Microsoft Intune › 0x87D1041C

Microsoft Intune · 0x87D1041C · Windows 10 / Windows 11 / Microsoft Intune

Intune Error 0x87D1041C: Win32 App Installation Failed on Windows 10/11

The Intune Management Extension failed to install a Win32 app due to detection rule mismatch or installer exit code issues. Review logs and adjust the detection rules or allowed return codes.

Error Details

FactValueSourceNote
Exact error stringDIAGAGENT_APP_DEPLOYMENT_FAILED (0x87D1041C)IntuneManagementExtension.log-> Failed
Affected OS build rangeWindows 10 / Windows 11Microsoft documentation
Registry key involvedHKLM\SOFTWARE\Microsoft\IntuneManagementExtension\LogsRegistry Editor-> Log path
Relevant service/endpoint URL*.manage.microsoft.com, *.delivery.mp.microsoft.comNetwork connectivity test
Log line signatureFailed to install app with error code 0x87D1041CIntuneManagementExtension.log

Log Files to Check

What This Error Actually Means

The error code DIAGAGENT_APP_DEPLOYMENT_FAILED (0x87D1041C) is raised by Microsoft Intune when the Management Extension (IME) fails to install a Win32 app, PowerShell script, or line-of-business (LOB) application on a Windows device. This error indicates that there was an issue during the installation process of the specified application, which could be due to various reasons such as incorrect detection rules, insufficient permissions, connectivity issues, or lack of necessary prerequisites.

Affected Versions and Scope

This error is relevant for Microsoft Intune deployments on Windows 10 and Windows 11 devices. The issue can affect both corporate-managed devices and personal devices enrolled in the organization's management policies through Intune. It does not impact older versions of Windows or non-Windows operating systems managed by other MDM solutions.

Where To Look First: Logs and Event IDs

To diagnose this error, you need to examine specific logs on the affected device and within the Microsoft Intune admin center: In the IntuneManagementExtension.log, look for lines that contain the exact string "Failed to install app with error code 0x87D1041C". Additionally, check the Event Viewer under Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostics-Provider > Admin. Look for Event ID 256, which often contains details about failed app installations.

Root Causes

There are several distinct causes that can lead to this error:

Detection Rule Mismatch

The Win32 app detection rule does not find the expected file, registry key, or MSI product code after installation. This typically results in IME marking the installation as failed because it cannot confirm successful deployment.

Non-Zero Exit Code from Installer

If the installer exits with a non-zero exit code that is not listed in the allowed return codes for the app within Intune, this error will occur. The exact exit code can be found in C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log.

Prerequisite Missing or Insufficient Disk Space

The application might require a prerequisite that is not yet installed on the device, such as .NET Framework or specific Windows updates. Alternatively, there may be insufficient disk space available to complete the installation.

Fix Procedure

To resolve this issue, follow these steps:
  1. Review C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log for the installer exit code.

  2. Correct the detection rule to exactly match what the installer creates. For example, if a registry key is expected but not found, ensure that the detection rule correctly identifies this key:

    Be cautious when modifying registry keys as incorrect changes can break enrolled devices.
  3. Add any non-zero exit codes to the app's allowed return codes in Intune. Navigate to Intune admin center > Apps > [App name] > Deployment profile.

  4. Check connectivity to *.manage.microsoft.com and *.delivery.mp.microsoft.com. Use the following PowerShell cmdlet to test connectivity:

    Test-NetConnection -ComputerName "contoso.manage.microsoft.com" -Port 443
    
  5. Increase disk space on the device if necessary.

  6. To run the installer manually under SYSTEM context, use PSExec. For example:

    psexec.exe -i -s "C:\path\to\installer.exe"
    

Error Code Variants

Error Code Description Distinguishing Features
0x87D1041C DIAGAGENT_APP_DEPLOYMENT_FAILED The installer exits with a non-zero exit code.
0x87D10420 DIAGAGENT_APP_INSTALLATION_TIMED_OUT The installation process takes longer than expected and times out.
0x87D1041E DIAGAGENT_APP_DETECTION_FAILED The detection rule fails to identify the installed application correctly.

Verification

To verify that the fix has been successful, check for the following:
A quick way to check if an app is installed correctly on a device is by running Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\Applications'.

Prevention

To prevent this error from recurring, implement the following: By following these guidelines, you can effectively diagnose and resolve issues related to error code 0x87D1041C in Microsoft Intune deployments.

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.