Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | Application Supersedence Removal Failed (0x87D1312C) | Intune Management Extension log file | -> IME logs |
| Affected build range | Windows 11 23H2 | Device OS Build | |
| Registry key involved | HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Registry | -> MSI product codes |
| Relevant service/endpoint URL | https://graph.microsoft.com/v1.0/deviceManagement/reports | Intune Admin Center API | |
| Log line signature | Application Supersedence Removal Failed (0x87D1312C) | Win32AppInventory log file | -> Search for 'supersedence' or error code |
Log Files to Check
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.logC:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Win32AppInventory.log
What This Error Actually Means
The error code 0x87D1312C, "Application Supersedence Removal Failed," is raised by Microsoft Intune's Win32 app deployment feature when it attempts to remove a superseded version of an application before installing the new version. The failure occurs during the removal phase of the supersedence process, where the old application must be uninstalled to make way for the newer one. This error can occur due to various issues such as blocked uninstallation processes, incorrect MSI cache entries, or administrative rights limitations.Affected Versions and Scope
This issue is specifically observed in Windows 11 build version 23H2 (OS Build). The problem does not affect earlier versions of Windows 10 or later builds that may be released after 23H2. It's important to note that this error can occur across all Intune tenant configurations, but the likelihood increases when there are frequent updates and rollouts for applications managed via Win32 app deployment.Where To Look First: Logs and Event IDs
To diagnose and troubleshoot this issue, you should first look into the logs generated by Microsoft Intune Management Extension (IME) on affected devices. The relevant log files are located atC:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log and C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Win32AppInventory.log. Search for the exact error string "Application Supersedence Removal Failed (0x87D1312C)" in these logs to pinpoint where the failure occurred.
Additionally, check the Event Viewer on the device for specific event IDs that indicate issues with MSI rollback operations. Look for Event ID 406 or 415 under Applications and Services Logs > Microsoft > Windows > AppXDeployment-Server > Operational. These events can provide additional context about why the removal of the superseded application failed.
Root Causes
Incomplete MSI Uninstallation Process
One common cause is when an older version of an application has a pending repair process or cached installation that prevents it from being uninstalled. This situation can be identified by checking theC:\Windows\Installer folder for orphaned MSI files and comparing them with the expected Product Code GUIDs in the registry at HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.
Locked Files During Uninstallation
Another frequent cause is when a running process holds onto DLLs or other files from the old application version, preventing Intune from removing it. Use Sysinternals Handle.exe or Resource Monitor (resmon.exe) to identify and terminate any processes that are locking these files.Administrative Rights Limitations
The IME service might not have sufficient administrative rights to executemsiexec.exe /x {ProductCode} commands, leading to the removal failure. Ensure that the IME service has the necessary permissions to perform uninstall operations on behalf of Intune.
Fix Procedure
To resolve this issue and allow for successful application updates via supersedence in Microsoft Intune, follow these steps: 1. **Identify the Superseded Application**: Use PowerShell cmdlets to list installed MSI products and identify the one causing issues.Get-WmiObject -Class Win32_Product | Where-Object Name -match '' | Select-Object Name,Version,IdentifyingNumber
2. **Check for Orphaned MSI Files**: Investigate the C:\Windows\Installer directory to find any orphaned MSI files that might be causing issues.
Get-ChildItem C:\Windows\Installer -Filter '*.msi' | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)}
3. **Manually Uninstall the Old Version**: Remove the superseded application manually using the Product Code GUID.
Warning: Be cautious when running this command as it can break enrolled devices if executed incorrectly.
msiexec.exe /x {PRODUCT-CODE-GUID} /qn /norestart
4. **Sync Intune Device**: After manually uninstalling the old version, sync the device with Intune to ensure that the new application deployment is initiated.
Get-ScheduledTask -TaskPath '\Microsoft\Windows\EnterpriseMgmt\*' | Start-ScheduledTask
Alternatively, use the Intune admin center: Devices > msiexec.exe /fvamus {PRODUCT-CODE-GUID}
7. **Retry Intune Deployment**: Once all steps have been completed, retry the application deployment from the Intune admin center: Devices > Error Code Variants
| Error Code | Description |
|---|---|
| 0x87D1312C | Application Supersedence Removal Failed (Correct MSI issues) |
| 0x87D1312B | Application Installation Failed (Incorrect MSI package or permissions issue) |
| 0x87D1312A | Application Deployment Blocked (Insufficient rights for IME service) |
Verification
To verify that the fix has been successful, monitor the Intune Management Extension log file and look for a line indicating that the application deployment was completed successfully. Additionally, check the device's Event Viewer underApplications and Services Logs > Microsoft > Windows > AppXDeployment-Server > Operational for event IDs 406 or 415 confirming successful MSI operations.
Prevention
To prevent recurrence of this issue, ensure that all application updates are thoroughly tested before deployment. Additionally, configure the IME service to run with administrative privileges and regularly clean up orphaned MSI files inC:\Windows\Installer. Implement a baseline check for installed applications using PowerShell scripts or Intune policies to detect potential conflicts early.
Tip: Use OMA-URI settings like
By following these steps and implementing preventive measures, you can ensure a smoother application deployment process within your organization's Microsoft Intune environment../Device/Vendor/MSFT/InventoryManager/EnableInventoryCollection to enable detailed inventory collection, which can help in diagnosing and preventing similar issues.