Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | 0x80180027 | Windows Event Logs, Setupact.log | -> Indicates TPM attestation timeout |
| Affected OS build range | Windows 11 22H2 | Microsoft Support documentation | -> Specific to this version of Windows |
| Registry key involved | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CBS | Windows Registry Editor | -> Contains attestation-related settings |
| Relevant service/endpoint URL | https://enterpriseregistration.windows.com | Microsoft Intune documentation | -> Used for hardware attestation during Autopilot |
| Log line signature | TPM Attestation failed with error 0x80180027 | Setupact.log, Panther logs | -> Identifies the failure point in logs |
Log Files to Check
C:\Windows\Temp\OOBE\Panther\Setupact.log%ProgramData%\Microsoft\Intune\Logs\*.log
What This Error Actually Means
The error code0x80180027 translates to "The data was invalid." In the context of Windows Autopilot, this error occurs during the TPM attestation phase when the TPM 2.0 hardware response exceeds a predefined threshold or is deemed invalid by the provisioning system. The component responsible for raising this error is the Windows provisioning engine, specifically when it communicates with the Microsoft Enterprise Registration Service (https://enterpriseregistration.windows.com). This failure prevents the device from completing the Autopilot enrollment process.
Affected Versions and Scope
This issue affects devices running **Windows 11 22H2** exclusively. It does not impact earlier versions of Windows 11 or Windows 10. The problem is isolated to environments using Microsoft Intune or Azure Active Directory (Azure AD) for device enrollment via Autopilot. Tenants utilizing the Microsoft Endpoint Manager (MEM) console with specific configurations, such as custom attestation policies or enhanced security settings, are more likely to encounter this error. Devices enrolled directly through the Windows 365 or Microsoft 365 portals without Intune are unaffected.Where To Look First: Logs and Event IDs
To diagnose this issue, examine the following log files: -C:\Windows\Temp\OOBE\Panther\Setupact.log
- %ProgramData%\Microsoft\Intune\Logs\*.log
Search for the exact error line:
TPM Attestation failed with error 0x80180027
Additionally, review Event Viewer logs under the following categories:
- **Event ID 1003**: Provisioning failure related to TPM attestation
- **Event ID 1004**: Detailed error information from the provisioning service
Use the following PowerShell cmdlet to extract relevant events:
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" -MaxEvents 50 | Where-Object { $_.Id -eq 1003 -or $_.Id -eq 1004 }
Root Causes
1. TPM Response Exceeds Threshold
The TPM hardware may generate a response that exceeds the allowed size or complexity threshold during attestation. This can occur due to firmware-specific behavior or misconfigurations in the TPM initialization process.2. Network Connectivity Issues
Intermittent or restricted network access tohttps://enterpriseregistration.windows.com may cause the TPM attestation request to timeout or fail validation.
3. Group Policy Misconfiguration
Incorrect Group Policy settings, particularly those related to device enrollment or TPM usage, can interfere with the attestation process.Fix Procedure
-
**Check TPM Status**:
Open PowerShell and run:
Get-Tpm -ErrorAction Stop | Select-Object TpmManufactureInfo, TpmModel, TpmVersion, IsActivated, IsEnabledIf the TPM is not activated or enabled, use the following cmdlet to enable it:Enable-Tpm -AllowClear -Force -ErrorAction Stop -
**Reset TPM Attestation**:
Use the following PowerShell cmdlet to reset the TPM attestation state:
dsregcmd /reset /forceThis command clears existing enrollment data and forces a重新连接到 provisioning service. -
**Adjust Registry Settings**:
Modify the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CBSto increase the TPM attestation timeout. Create or update the DWORD valueTPMAttestationTimeoutInSecondsand set it to a higher value (e.g., 60 seconds). Use the following PowerShell cmdlet to apply this change:New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CBS" -Name TPMAttestationTimeoutInSeconds -Value 60 -PropertyType DWORD -Force -
**Verify Network Connectivity**:
Ensure the device can reach
https://enterpriseregistration.windows.com. Use the following cmdlet to test connectivity:Test-NetConnection -ComputerName enterpriseregistration.windows.com -Port 443If blocked, adjust firewall or proxy settings accordingly. -
**Check Group Policy Settings**:
Review Group Policy configurations related to TPM and device enrollment. Use the following cmdlet to list relevant policies:
gpresult /h C:\Temp\GPO_Report.htmlLook for policies under "Computer Configuration\Administrative Templates\System\Device Guard" that may restrict TPM usage. -
**Re-enroll Device**:
After applying the above fixes, re-enroll the device via Autopilot. Use the following cmdlet to initiate enrollment:
dsregcmd /statusIf successful, the output should indicate a connected state with Azure AD.
**Warning**: The step
dsregcmd /reset /force will clear all existing enrollment data. Use this only if you are certain it won't affect enrolled devices.
Error Code Variants
| Error Code | Description | Distinguishing Factor |
|---|---|---|
0x80180026 |
TPM Attestation Failed (General) | Lacks the specific "data invalid" context of 0x80180027. |
0x80180028 |
TPM Attestation Timed Out | Indicates a timeout rather than invalid data. |
Verification
After applying the fixes, verify successful enrollment by checking: - The absence of0x80180027 in Setupact.log and Intune logs.
- A successful connection state in dsregcmd /status.
- Device appearance in the Intune admin center under "Devices > Enrollment".
Prevention
To prevent recurrence: 1. Implement a registry baseline with extended TPM attestation timeouts using:New-GPO -Name "TPM Attestation Timeout" | New-GPLink -TargetName "Default Domain Policy" | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CBS" -Name TPMAttestationTimeoutInSeconds -Value 60
2. Regularly audit network policies to ensure https://enterpriseregistration.windows.com is accessible.
3. Monitor device firmware updates, especially TPM-related patches.
**Tip**: Use the following cmdlet to quickly check TPM status across devices:
Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'" | Select-Object deviceName, enrollmentState