Error Details
| Fact | Value | Source | Note |
|---|
| Exact error string | 0x87D20009 - PowerShell or Win32 app result not uploaded to service | Intune Management Extension logs | |
| Affected build range | Windows 11 22H2 | OS version details | |
| Registry key involved | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension | Registry configuration | |
| Relevant service/endpoint URL | https://manage.microsoft.com | Service communication logs | |
| Log line signature | UploadResult failed with status code: 401 Unauthorized | IntuneManagementExtension.log | |
Log Files to Check
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.logWindows Event Logs under Microsoft-Windows-IntuneManagementExtension/Operational
What This Error Actually Means
The error code
0x87D20009 is a hexadecimal representation of an issue encountered within the Microsoft Intune Management Extension. Specifically, this error indicates that the Intune Management Extension failed to upload the results of a PowerShell or Win32 application execution to the Intune service. The component responsible for raising this error is the
IntuneManagementExtension, which is designed to manage device configurations and applications within the Microsoft Endpoint Manager (MEM) ecosystem.
When this error occurs, it suggests that there was an issue during the communication phase between the local device's Intune Management Extension and the Intune service endpoint at
https://manage.microsoft.com. The log file
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log contains detailed information about this failure, including the specific error message:
UploadResult failed with status code: 401 Unauthorized. This indicates that the request to upload the results was rejected due to unauthorized access.
Affected Versions and Scope
This issue is observed specifically on devices running Windows 11, version 22H2. While there have been no reports of this error occurring on earlier versions of Windows 11 or other operating systems, it is essential to monitor for similar issues across different platforms as Microsoft continues to update its software. The scope of the problem appears to be limited to environments where Intune is actively managing devices, particularly those enrolled in Microsoft's endpoint management solutions.
It is important to note that this error does not affect devices running Windows 10 or earlier versions of Windows 11. Additionally, devices that are not enrolled in Intune or do not have the Intune Management Extension installed are also unaffected. The issue seems to be isolated to specific configurations where the Intune Management Extension is utilized for managing PowerShell scripts or Win32 applications.
Where To Look First: Logs and Event IDs
To diagnose this error, you should first examine the logs generated by the Intune Management Extension. The primary log file is located at
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log. Within this file, search for the exact log line:
UploadResult failed with status code: 401 Unauthorized. This will help you identify the root cause of the issue.
Additionally, review the Windows Event Logs under the
Microsoft-Windows-IntuneManagementExtension/Operational log channel. Look for specific event IDs that are associated with this error:
- **Event ID 1001**: This event indicates a failure in uploading application results to the Intune service.
- **Event ID 2005**: This event is logged when there is an authentication issue during communication with the Intune service.
To extract these logs programmatically, you can use the following PowerShell cmdlet:
```powershell
Get-WinEvent -LogName "Microsoft-Windows-IntuneManagementExtension/Operational" | Where-Object { $_.Id -eq 1001 -or $_.Id -eq 2005 } | Format-List TimeCreated, Message
```
This cmdlet will retrieve and display events with IDs 1001 and 2005 from the Intune Management Extension operational log.
Root Causes
There are several potential root causes for this error. Each can be identified by specific symptoms or log entries:
1. Authentication Issues (401 Unauthorized)
The most common cause of
0x87D20009 is an authentication failure when attempting to communicate with the Intune service. This typically occurs due to incorrect or expired credentials, misconfigured authentication policies, or issues with token validation.
To diagnose this issue:
- Check the device's enrollment status in the Intune admin center.
- Verify that the device has a valid and active Azure Active Directory (Azure AD) token by running
dsregcmd /status.
- Ensure that the device is enrolled in Azure AD and that its credentials are up to date.
2. Network Connectivity Problems
Another potential cause is network-related issues that prevent the Intune Management Extension from communicating with the service endpoint at
https://manage.microsoft.com. This could be due to firewall rules, proxy configurations, or network latency.
To identify this issue:
- Test connectivity to
https://manage.microsoft.com using tools like
ping or
tracert.
- Check for any firewall rules that might block outgoing traffic on the required ports (typically 443 for HTTPS).
- Review network logs for any dropped packets or connection attempts to the Intune service.
3. Misconfigured Registry Settings
The Intune Management Extension relies on specific registry settings to function correctly. Incorrect configurations can lead to failures in uploading application results.
To check for this issue:
- Examine the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension.
- Ensure that all required values (e.g.,
ServiceEndpoint,
LogLevel) are correctly set.
- If necessary, reset these settings to their default values using the following PowerShell cmdlet:
```powershell
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension" -Name ServiceEndpoint -Value "https://manage.microsoft.com"
```
Fix Procedure
To resolve this issue, follow these steps:
-
**Check Device Enrollment Status**:
Navigate to the Intune admin center and verify that the affected device is enrolled and has a valid Azure AD token. You can do this by running the following cmdlet in PowerShell:
```powershell
dsregcmd /status
```
Ensure that the output indicates a successful enrollment.
-
**Reset Intune Management Extension**:
If authentication issues are suspected, reset the Intune Management Extension service. This can be done by restarting the service using PowerShell:
```powershell
Restart-Service -Name IntuneManagementExtension
```
Additionally, you may need to clear cached credentials or re-enroll the device in Azure AD.
-
**Verify Network Connectivity**:
Ensure that the device can communicate with the Intune service endpoint. Test connectivity using:
```powershell
Test-NetConnection -ComputerName manage.microsoft.com -Port 443
```
If this test fails, investigate and adjust firewall or proxy settings as needed.
-
**Check Registry Settings**:
Review the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension for any misconfigurations. Reset critical values if necessary using PowerShell cmdlets like:
```powershell
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension" -Name LogLevel -Value 3
```
-
**Monitor Logs for Success**:
After applying the fixes, monitor the logs to ensure that the Intune Management Extension is successfully uploading results. Use the following cmdlet to check recent log entries:
```powershell
Get-WinEvent -LogName "Microsoft-Windows-IntuneManagementExtension/Operational" -MaxEvents 50 | Where-Object { $_.Id -eq 1001 } | Format-List TimeCreated, Message
```
Look for confirmation that the upload was successful.
Warning: Restarting the Intune Management Extension service can temporarily disrupt device management operations. Ensure that this action is performed during a maintenance window if possible.
Error Code Variants
| Error Code |
Description |
Distinguishing Factors |
0x87D20009 |
PowerShell or Win32 app result not uploaded to service |
Specifically related to authentication failures (401 Unauthorized) when uploading application results. |
0x87D2000A |
Application execution failed due to missing dependencies |
Occurs when required files or libraries are not present on the device. |
0x87D2000B |
Timeout occurred while waiting for application execution results |
Indicates a timeout during communication with the Intune service, often due to network latency or high load. |
Verification
To confirm that the issue has been resolved:
- Review the Intune Management Extension logs for confirmation that results are being uploaded successfully. Look for messages indicating a successful upload.
- Verify in the Intune admin center that the device is reporting its status correctly and that any PowerShell or Win32 applications have executed without errors.
- Use the following cmdlet to check recent events related to application execution:
```powershell
Get-WinEvent -LogName "Microsoft-Windows-IntuneManagementExtension/Operational" | Where-Object { $_.Id -eq 1001 } | Format-List TimeCreated, Message
```
Ensure that the latest entries do not contain the
401 Unauthorized error.
Prevention
To prevent recurrence of this issue:
- Implement regular monitoring of device enrollment status and Azure AD token validity using cmdlets like
dsregcmd /status.
- Establish a routine to check network connectivity to the Intune service endpoint and ensure that necessary ports are open.
- Regularly review and update registry settings related to the Intune Management Extension to maintain optimal configurations.
- Consider implementing automated scripts or monitoring tools to detect and address potential issues before they escalate.
By following these steps, you can minimize the likelihood of encountering this error in the future and ensure smooth operation of your Intune-managed environment.