Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | DIAGAGENT_APP_DEPLOYMENT_FAILED (0x87D1041C) | IntuneManagementExtension.log | -> Failed |
| Affected OS build range | Windows 10 / Windows 11 | Microsoft documentation | |
| Registry key involved | HKLM\SOFTWARE\Microsoft\IntuneManagementExtension\Logs | Registry Editor | -> Log path |
| Relevant service/endpoint URL | *.manage.microsoft.com, *.delivery.mp.microsoft.com | Network connectivity test | |
| Log line signature | Failed to install app with error code 0x87D1041C | IntuneManagementExtension.log |
Log Files to Check
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.logC:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log
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:C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.logC:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log
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 inC:\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:Review
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.logfor the installer exit code.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.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.Check connectivity to
*.manage.microsoft.comand*.delivery.mp.microsoft.com. Use the following PowerShell cmdlet to test connectivity:Test-NetConnection -ComputerName "contoso.manage.microsoft.com" -Port 443Increase disk space on the device if necessary.
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:In
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log, look for a log entry indicating successful installation of the app.Within the Intune admin center under
Apps > [App name] > Monitor, ensure that the device install status shows as "Installed" with no error codes.