certreq -enrollaik fails with 404 "The authority ... microsoftaik.azure.net does not exist" when IntermediateCACertStore holds another TPM's certificates (sysprepped OEM image)

Robert Freiholtz 0 Reputation points
2026-11-24T12:21:39.6866667+00:00

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

  1. 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.
  2. 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.

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments

3 answers

Sort by: Oldest
  1. AI answer

    2026-11-24T15:54:17.26+00:00

    Microsoft’s public documentation does not specify that Sysprep /generalize clears Services\TPM\WMI\Endorsement\IntermediateCACertStore, nor that TPM provisioning validates or replaces its contents; the reported reproduction should therefore be treated as a suspected Windows/OEM imaging and reconciliation defect.

    Recovery on the affected Intel PTT device

    Before using custom registry code, try the published Intel PTT recovery sequence from an elevated Command Prompt or PowerShell:

    TPMDiagnostics.exe InstallEkCertFromNVR
    TPMDiagnostics.exe InstallEkCertThroughCoreProv
    TPMDiagnostics.exe ekchain
    TPMDiagnostics.exe GetWindowsAIKCert
    TPMDiagnostics.exe EnrollWindowsAIKCert
    

    This is a reported Q&A workaround and is not guaranteed for every Intel certificate hierarchy.^1^

    To determine whether it corrected this specific failure:

    1. Export the registry state before and after running the commands:
         reg export "HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI\Endorsement" "%TEMP%\TPM-Endorsement-before.reg" /y
         rem Run the TPMDiagnostics commands
         reg export "HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI\Endorsement" "%TEMP%\TPM-Endorsement-after.reg" /y
      
    2. Compare the exports and inspect IntermediateCACertStore.
    3. Run TPMDiagnostics.exe ekchain and confirm that the resulting chain corresponds to the active TPM—not merely certificates having matching subject names.
    4. Retry:
         certreq -enrollaik -f -v -config "" -machine request.inf
      
    5. Confirm that the generated INTC-KeyId-... authority changed to the authority derived from the valid chain and that GetCACaps returns success.

    Get-TpmEndorsementKeyInfo is also useful for inspection:

    $ek = Get-TpmEndorsementKeyInfo -HashAlgorithm sha256
    $ek | Select-Object IsPresent, PublicKeyHash
    $ek.ManufacturerCertificates |
        Select-Object Subject, Issuer, Thumbprint, NotBefore, NotAfter
    

    It reports the EK public-key hash and certificate collections known to Windows, but it is diagnostic rather than a repair operation and does not by itself prove that every returned certificate was read directly from TPM NV storage.^2^

    Is Sysprep expected to clear this store?

    No published contract located for Sysprep /generalize names this store or states that it is removed.

    The documented contract is broader: /generalize removes unique system information and hardware-specific settings so an image can be reused on another computer.^3^ Microsoft also states that imaging for another computer requires /generalize, even when the target hardware is identical.^4^

    Consequently:

    • Foreign TPM certificates surviving generalization appear inconsistent with the purpose of generalization.
    • The documentation is insufficient to state that this particular key is contractually required to be deleted.
    • The timestamp and first-boot evidence strongly support an OEM-image origin, but ownership of the defect—Sysprep, TPM provisioning, or the OEM capture workflow—requires investigation.

    Should provisioning reconcile it?

    Windows provisioning is documented as consulting:

    HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI\Endorsement
    

    when determining the EK and locally stored TPM state.^5^

    However, the documentation does not state that provisioning:

    • validates IntermediateCACertStore against certificates in TPM NV;
    • removes certificates associated with another TPM;
    • repopulates an empty store; or
    • repairs the store after a TPM clear.

    Therefore, the observed persistence through clearing and reprovisioning is not contradicted by a documented repair guarantee, but it is a credible product defect or missing hardening behavior.

    About the custom registry-store workaround

    Adding the actual TPM chain through CERT_STORE_PROV_REG and CertAddEncodedCertificateToStore is an unsupported workaround validated by the reported experiment, not a documented Microsoft remediation.

    If it is used in deployment tooling:

    • Back up the registry key first.
    • Parse concatenated DER objects across consecutive NV indices correctly.
    • Cryptographically verify that the EK certificate’s public key matches the active TPM EK before importing its chain.
    • Do not trust subject names as identity.
    • Prefer adding the matching chain over deleting existing data until Microsoft or the OEM defines supported cleanup behavior.

    Static Intel CA downloads are not a general substitute: the required chain depends on the TPM’s actual EK hierarchy.

    Escalation

    Because this is reproducible on an Insider build, submit two Feedback Hub reports—one problem and one suggestion:

    1. Press Win+F and select Report a problem.
    2. Record reproduction from registry inspection through certreq -enrollaik.
    3. Attach sanitized before/after registry exports, Event 86 XML, TPMDiagnostics.exe ekchain output, TPM NV chain fingerprints, and the image/provisioning timeline.
    4. Separately suggest that Sysprep remove per-TPM endorsement state or provisioning reconcile it, and that Event 86 identify the certificate-store source.

    Feedback Hub supports recorded steps and file attachments, which are available only to Microsoft rather than public viewers.^6^ Open a parallel OEM case because the evidence indicates that the foreign chain was present in the factory image.


    References

    1. Azure AIK Enrollment returns HTTP 404 (Authority does not exist) for Intel PTT KeyId 70ea16aa615a92b64d0df14c32dce302b98631de - Microsoft Q&A
    2. Get-TpmEndorsementKeyInfo-Description
    3. generalize
    4. Sysprep Command-Line Options
    5. Device health attestation
    6. Deeper look at feedback
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. James Gamble 420 Reputation points
    2026-11-24T16:04:38.7333333+00:00

    Hola Robert,

    Thanks for documenting this so thoroughly! I did some additional research into the TPM specifications and Microsoft's imaging architecture and found a couple of things worth considering.

    The Trusted Computing Group's EK Credential Profile explicitly makes it optional to store endorsement certificate chains in TPM nonvolatile memory. This might explain why Windows maintains a separate certificate store rather than relying exclusively on the TPM. However, it doesn't explain why Windows fails to reconcile the available certificates when enrollment fails.

    Regarding Sysprep, Microsoft documents that individual Sysprep providers are responsible for removing component-specific information during generalization.

    Given that you've established when the registry store was last modified, I'd be interested to know whether the original factory Sysprep logs are still available at C:\Windows\System32\Sysprep\Panther. Comparing those with the specialize-phase logs under C:\Windows\Panther might help establish whether TPM-related cleanup was attempted during generalization or whether the stale certificates were introduced elsewhere in the OEM imaging process.

    Another useful controlled experiment, if you have access to a spare test machine, would be to reproduce this using an unmodified Microsoft installation image and capture the certificate store immediately before generalization, after generalization but before first boot, and after specialization.

    That could help distinguish a Sysprep cleanup defect from a TPM provisioning defect without involving MSI's imaging customizations.

    Thanks,

    James

    Was this answer helpful?

    0 comments No comments

  3. Robert Freiholtz 0 Reputation points
    2026-11-25T08:49:14.2766667+00:00

    Answer to the AI agent:

    Thanks. I tested the suggested TpmDiagnostics commands on a computer where I had reproduced the fault (Intel PTT, IntermediateCACertStore holding only certificates with the right subject names but other keys).

    The install commands do not repair it. InstallEkCertFromNVR and InstallEkCertThroughCoreProv both report success, but IntermediateCACertStore is unchanged afterwards. The same is true when the store is empty: it stays empty. They reinstall the EK certificate itself, which was already correct. Enrollment keeps failing with the same 404.

    The tool does however detect the fault. Comparing two of its commands shows whether Windows' record disagrees with the TPM:

    IntermediateCACertStore holds ekchainNV (TPM only) ekchain (Windows' record)
    The TPM's own chain Valid chain to the manufacturer's root Valid chain
    Another TPM's chain, same names Valid chain Trust error 0x10008, chain stops early
    Nothing Valid chain Trust error 0x10000, EK certificate alone

    So if ekchainNV gives a valid chain and ekchain does not, the certificates in the TPM are fine and Windows' copy of them is the problem. That is the case where adding the TPM's own chain certificates to the store, as described in my question, makes enrollment work.

    If both commands give the same error, the chain in the TPM itself does not reach the manufacturer's root, and this is a different problem.

    Installing the manufacturer's CA certificates into the ordinary Windows certificate stores, as suggested in other threads, does not help either: enrollment builds the chain from IntermediateCACertStore.

    My questions to Microsoft stand: Sysprep leaves this store in place, TPM provisioning never checks it against the TPM, and the enrollment error gives no hint that the store is the cause.

    Answer to James:

    The Sysprep logs exist on the affected laptop, but I only recorded their dates, not their content. System32\Sysprep\Panther has logs from two dates, about six weeks apart and both months before the customer's first boot, so the image was generalized twice.

    One correction to my question: I wrote that the store was last written on the day of the Sysprep. I did not measure that directly, because I had already repaired the store when I collected the timestamps. What I have is a neighbouring key under Services\TPM\WMI last written in the same minute as the first Sysprep log, and the first failed enrollment two minutes into the customer's first boot, already asking for the wrong authority. So the certificates were in place before first boot; exactly when they were written is not established.

    I have not done the clean-image experiment. It would be the right way to tell a Sysprep fault from something added by the manufacturer's imaging process. Since I no longer have access to the affected laptop, I cannot go back to read its Sysprep logs or check anything else on it.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.