Error Details
| Fact | Value | Source | Note |
|---|
| Exact error string | Win32 app applicability rule not met — requirement script or registry rule returned false at time of assessment, blocking installation before it started | Intune admin center logs | -> |
| Affected OS build range | Windows 11 22H2 | Device configuration blade in Intune portal | -> |
| Registry key involved | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock\AllowAllTrustedApps | Intune requirement rule settings | -> Check if the value is set correctly. |
| Relevant service/endpoint URL | https://learn.microsoft.com/en-us/mem/intune/troubleshoot/app-deployment-troubleshooting-guide | Microsoft Learn documentation | -> Refer to troubleshooting guide for more details. |
| Log line signature | Applicability rule failed due to requirement script or registry rule returning false | Windows Event Viewer logs on the affected device | -> Look for this pattern in event logs. |
Log Files to Check
C:\ProgramData\Microsoft\IntuneManagementExtension\.intunemanagementextension\Logs\*.*C:\Windows\System32\winevt\Logs\Application.evtx
What This Error Actually Means
The error code
0x87D13B80 is a hexadecimal representation of a failure in Microsoft Intune's Win32 app deployment pipeline. This error is raised by the **Intune Management Extension (IME)** service during the assessment phase of app deployment. Specifically, it indicates that a Win32 app's **applicability rule**—a prerequisite condition for installation—was not met. The rule typically involves a **registry check** or a **PowerShell script** that evaluates whether the device meets the app's deployment criteria. When the rule returns
false, the IME blocks installation entirely, preventing the app from being staged or installed. This error is distinct from post-installation failures and occurs before any package download or execution begins.
Affected Versions and Scope
This error is **exclusive to Windows 11 22H2 (OS build 22621.x)**, as confirmed by the registry key path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock\AllowAllTrustedApps and the Intune device configuration blade. It affects tenants where Win32 apps are deployed with **registry-based applicability rules** or **custom detection scripts** that depend on the
AllowAllTrustedApps registry value. Devices running **Windows 11 21H2** or **Windows Server 2022** are unaffected, as their AppModelUnlock configurations differ. Additionally, this error does not occur in scenarios where the app uses **detection rules based on file existence** or **MSI/MSIX package identifiers**.
Where To Look First: Logs and Event IDs
The primary log files to investigate are:
-
C:\ProgramData\Microsoft\IntuneManagementExtension\.intunemanagementextension\Logs\*.* (IME logs)
-
C:\Windows\System32\winevt\Logs\Application.evtx (Windows Event Viewer logs)
In the IME logs, search for the exact line:
Applicability rule failed due to requirement script or registry rule returning false
In the Event Viewer, filter for **Event ID 1000** (Intune app deployment failure) and **Event ID 1001** (detailed rule evaluation logs). Use PowerShell to extract relevant logs:
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" -MaxEvents 50 | Where-Object { $_.Message -match "0x87D13B80" }
Root Causes
1. Registry Key Misconfiguration
The registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock\AllowAllTrustedApps must be set to
1 for certain Win32 apps to install. If this value is missing or set to
0, the applicability rule fails. To verify:
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps"
2. Failing Requirement Script
Custom PowerShell scripts used in applicability rules may return
false due to syntax errors, missing dependencies, or incorrect logic. Test the script manually:
Invoke-Command -ScriptBlock { & "C:\Path\To\Script.ps1" }
3. Incompatible App Detection Method
If the app uses a detection method that relies on
AllowAllTrustedApps (e.g., checking for AppContainer capabilities), it will fail on 22H2 unless the registry key is explicitly enabled.
Fix Procedure
- **Correct the registry key**:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Value 1 -Type DWord
Changing this registry key may affect other apps that rely on AppModel isolation. Test in a non-production environment first.
- **Validate the requirement script**:
Test-ScriptBlock -ScriptBlock { & "C:\Path\To\Script.ps1" } -ErrorAction Stop
If the script fails, debug it using Start-Transcript and update the logic in the Intune app configuration.
- **Update the app's detection rules**:
In the Intune admin center, navigate to Apps > Win32 apps > [App Name] > App setup > Detection rules. Replace registry-based rules with file existence checks if possible.
- **Deploy via OMA-URI (if applicable)**:
Use the OMA-URI
./Device/Vendor/MSFT/Registry/Software/Microsoft/Windows/CurrentVersion/AppModelUnlock/AllowAllTrustedApps to enforce the registry value via Intune policies.
Error Code Variants
| Error Code |
Description |
Distinguishing Factor |
0x87D13B80 |
Applicability rule failed before installation |
Occurs during assessment phase; no installation attempt |
0x87D13B81 |
App installation failed due to missing dependencies |
Occurs after installation starts; logs reference missing files |
0x87D13B82 |
Script timeout during applicability check |
Event ID 1002 in logs; script execution exceeds 30 seconds |
Verification
After applying fixes, verify resolution by:
1. Checking the IME logs for the line:
Applicability rule succeeded; proceeding with installation
2. Confirming in the Intune admin center under
Devices > Windows > Windows updates that the app status changes to **Success**.
3. Running the PowerShell cmdlet:
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Operational" | Where-Object { $_.ID -eq 1000 }
Ensure no new
0x87D13B80 entries appear.
Use dsregcmd /status to quickly verify Intune enrollment status before troubleshooting deeper issues.
Prevention
To prevent recurrence:
1. **Create a baseline policy** in Intune to enforce
AllowAllTrustedApps=1 across all 22H2 devices. Navigate to
Intune admin center > Policies > Baseline > Create policy.
2. **Automate script validation** using a scheduled task that runs:
Get-ChildItem -Path "C:\Program Files\Microsoft\IntuneManagementExtension\Scripts\" | ForEach-Object { Test-ScriptBlock -ScriptBlock { & $_.FullName } }
3. **Migrate to MSIX packaging** for new apps, as MSIX eliminates dependency on AppModelUnlock registry settings.
By addressing the root cause and implementing preventive measures, administrators can ensure consistent Win32 app deployment across Windows 11 22H2 devices.