I am posting this as a report with a workaround, since I found nothing about it when searching, and with two questions at the end.
Symptom
On a new MSI Vector 18 HX AI A2XWIG laptop (Intel Core Ultra 9 275HX, Intel PTT firmware TPM, Windows 11 as installed by the manufacturer), AIK enrollment always fails:
certreq -enrollaik -f -v -config "" -machine request.inf
The Application log shows CertificateServicesClient-CertEnroll event 86:
SCEP Certificate enrollment initialization for Local system via
https://INTC-KeyId-<key id>.microsoftaik.azure.net/templates/Aik/scep failed:
GetCACaps: Not Found
{"Message":"The authority "intc-keyid-<key id>.microsoftaik.azure.net" does not exist."}
0x80190194 (-2145844844 HTTP_E_STATUS_NOT_FOUND)
The TPM itself is fine: ready, attestation capable, endorsement key certificate present, and the TPM health checks report "Attestable". Clearing the TPM and letting Windows provision it again does not help.
Cause
Windows does not build the endorsement key certificate's chain from the TPM. It builds it from its own copy of the TPM's intermediate CA certificates, the registry certificate store
HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI\Endorsement\IntermediateCACertStore
and names the AIK service authority after the authority key identifier at the top of the chain it finds there.
On the failing laptop that store held three certificates that belong to a different TPM: the same subject names as the laptop's own chain (ROM CA, Kernel CA, PTT CA), but other keys, issued under a different Intel issuing CA. The chain Windows built therefore ended at a key identifier for which the AIK service has no authority. The TPM's real chain, stored in its NV indices from 0x01C00100, leads to an issuing CA that the AIK service does know (GetCACaps answers 200 for it).
Everything on the machine points to the store's content having come with the manufacturer's Windows image: the store was last written on the day the image was sysprepped, months before the first boot at the customer, and the first failed enrollment happened two minutes into that first boot.
Two more observations:
- Naming the correct authority explicitly with
-config <url> does not help. The service then answers HTTP 400, "No valid TPM EK/Platform certificate provided in the TPM identity request message", because the request still carries the chain from the store.
- An empty store fails in the same way, with a 404 for an authority named after the endorsement key certificate's own issuer.
Reproduction
On a healthy machine with Intel PTT I could reproduce it by changing only that store:
| Content of IntermediateCACertStore |
Result of certreq -enrollaik |
| The TPM's own chain certificates |
Enrolled |
| Certificates with the same subject names but other keys |
404, the authority does not exist |
| Both sets |
Enrolled |
| Empty |
404, the authority does not exist |
Windows did not correct or refill the store in any of these runs.
Workaround
Read the TPM's own chain certificates from the NV indices starting at 0x01C00100 (concatenated DER certificates; a chain longer than one index continues in the next) and add them to the store above, for example with CertOpenStore(CERT_STORE_PROV_REG) on that key and CertAddEncodedCertificateToStore. Nothing has to be removed: given both chains, Windows follows the one whose keys match. After that, enrollment succeeded immediately on the affected laptop and still did after a restart.
Questions
- Is Sysprep /generalize expected to clear
Services\TPM\WMI\Endorsement? As it is, a record that describes one specific TPM travels with the image to every computer it is deployed on.
- Should TPM provisioning check this store against the TPM? A TPM clear and several provisioning runs left the foreign certificates in place.
It would also help if the enrollment error said that the chain came from this store. The 404 reads as if Microsoft does not know the TPM's manufacturer, which sent us looking in the wrong place for days.
Seen on Windows 11 Insider build 26300 with Intel PTT. I have not tested other TPM vendors or builds.