Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0xC004F301

0xC004F301 and Event ID 12321: Token-Based Activation Will Not Complete

11 min read Updated October 5, 2026 Windows Activation & Licensing

Fix it now

Event ID 12321 does not mean a challenge timed out. Microsoft publishes it as Token Based Activation failed with HR=0xC004F011, caused by the token issuance licence not being installed or the smart card certificates not being present – and it says the warning can be safely ignored on a machine that does not use token activation.

Run these on the affected machine in an elevated Command Prompt, in order

slmgr /lil
slmgr /ltc
slmgr /dlv
  1. Decide first whether this machine is meant to use token-based activation at all. If it activates by KMS, Active Directory or a MAK, Microsoft’s own guidance is that this warning is harmless and does not affect those methods.
  2. slmgr /lil lists the installed token-based activation issuance licences. An empty result is the documented cause of Event ID 12321.
  3. If the issuance licence is missing, install it: slmgr /ilc <full path to the .xrm-ms file>, then re-check with slmgr /lil.
  4. slmgr /ltc lists the valid token-based activation certificates that can activate installed software. An empty result means no certificate the machine can see satisfies an installed issuance licence.
  5. With the card inserted and enumerated, activate using the thumbprint: slmgr /fta <thumbprint> <PIN>, then read the result with slmgr /dlv.

Issuance licences are validated at run time by the Software Protection service rather than when they are installed, so slmgr /ilc succeeding tells you the file was accepted, not that it will work.

If that fixed it you can stop here. If not, the next section covers what token-based activation needs and why none of the three codes here has a published meaning.

Why it happens

Token-based activation exists for networks that cannot reach Microsoft and cannot run their own activation infrastructure. Instead of contacting a service, the machine holds an issuance licence – a signed licence file, usually with an .xrm-ms extension – and activates against a certificate the licence is prepared to accept. The private key stays with the credential, which in Microsoft’s documentation means a smart card.

The most useful correction in this article concerns the event. Microsoft publishes Event ID 12321 as a Warning from the Microsoft-Windows-Security-Licensing-SLC source with the description Token Based Activation failed and HR=0xC004F011, which is SL_E_LICENSE_FILE_NOT_INSTALLED. The documented cause is that the token issuance licence is not installed inside Windows, or the certificates on the smart card are not present. Earlier versions of this article described it as the platform recording a challenge that never completed. That is not what it says, and the difference matters because the documented remedy is to reinstall the issuance licence with slmgr /ilc.

There is a second half to Microsoft’s guidance that saves most readers the rest of the article. If you are not using token-based activation, the warning can be safely ignored and will not affect the ability to activate Windows using KMS host machines or MAK keys. A great many people arrive at Event ID 12321 having never intended to use token activation, find an article about smart card timing, and lose a morning. If that is you, stop here.

The three codes in this record – 0xC004F301, 0xC004F303 and 0xC004F30C – have no published meaning on learn.microsoft.com or support.microsoft.com. The readings in earlier versions of this article, including the challenge-expiry story that used to be in its title, were unsourced. What can be said is where they appear, and what the documented commands around them do. For the machine’s own wording, run slui.exe 0x2a 0xC004F301.

The issuance licence is not installed

You have this one if Event ID 12321 with HR=0xC004F011, and slmgr /lil returns nothing.

  1. Obtain the token issuance licence file from whoever administers your token activation policy.
  2. Install it: slmgr /ilc <full path to the .xrm-ms file>.
  3. Confirm it registered with slmgr /lil.
  4. Restart the licensing service so the policy is loaded: net stop sppsvc then net start sppsvc, and retry.

This is Microsoft’s documented cause and documented fix for the event. Start here before anything involving the card.

This machine was never meant to use token activation

You have this one if Event ID 12321 on a machine that activates perfectly well by KMS, Active Directory or a MAK.

  1. Confirm how the machine is meant to activate: slmgr /dlv shows the method and status.
  2. If it is licensed and activated by another method, Microsoft’s guidance is that this warning can be safely ignored.
  3. Suppress the noise at the monitoring layer rather than by installing an issuance licence you have no use for.
  4. Do not install token activation components to silence an event.

The card is not present, or Windows cannot open it

You have this one if slmgr /ltc returns nothing, and the reader is either absent or shows a problem in Device Manager.

  1. Insert the card and wait until Windows has finished enumerating it before you start anything.
  2. Confirm the Smart Card service is running, and that the service which surfaces cards to applications is running too.
  3. Install or reinstall the card vendor’s minidriver or middleware. A card Windows can see as a device but cannot open has no usable key container.
  4. Over a remote session, confirm smart card redirection is enabled, or run the activation at the console.

The certificate chain cannot be built on this machine

You have this one if The card enumerates and a certificate is present, but activation is refused and the chain has a missing issuer.

  1. Export the card certificate and check which link in the chain is missing.
  2. Import the issuing and root certificate authority certificates into the machine’s Intermediate and Trusted Root stores.
  3. Confirm they landed before retrying.
  4. Retry slmgr /fta <thumbprint> <PIN> with the card already inserted.

The clock is far enough out that certificates read as invalid

You have this one if Certificate validation fails on a machine whose time is visibly wrong, which is common on isolated networks with no time source.

  1. Check the current state with w32tm /query /status.
  2. Correct it with w32tm /resync, or set the time manually where no source is reachable.
  3. Configure an internal time source so it does not recur.
  4. Retry activation.

There is no /force parameter on w32tm /resync. Adding one makes w32tm report the argument as unexpected and print its usage without resynchronising anything.

Full reference

What is published, and what is not

Entry Status Reading
Event ID 12321 Published Warning from Microsoft-Windows-Security-Licensing-SLC: Token Based Activation failed, HR=0xC004F011. Cause: the issuance licence is not installed, or the smart card certificates are not present
0xC004F011 Published as the HR in that event SL_E_LICENSE_FILE_NOT_INSTALLED
0xC004F301 No published meaning found Read the machine’s own text with slui.exe 0x2a 0xC004F301
0xC004F303 No published meaning found As above
0xC004F30C No published meaning found As above

The four commands token activation actually uses

Command Documented behaviour
slmgr /lil Lists installed token-based activation issuance licences
slmgr /ltc Lists valid token-based activation certificates that can activate installed software
slmgr /fta <thumbprint> [<PIN>] Forces token-based activation using the identified certificate. The optional PIN unlocks the private key without a prompt, for hardware-protected certificates such as smart cards
slmgr /ilc <license_file> Installs the specified licence file. Used for troubleshooting, token-based activation, or manual installation
slmgr /ril <ILID> <ILvID> Removes an installed token-based activation issuance licence. Takes two arguments, not one

Microsoft’s note on slmgr /ilc is worth reading twice: licences are validated at run time by the Software Protection service, not during installation. A successful install proves the file was accepted, not that the policy inside it matches anything on your machine.

Doing the activation in one pass

  1. Insert the card and wait for the reader to settle. Do not start the command and then insert it.
  2. Confirm the machine can see a certificate and a key container on the card.
  3. Run slmgr /ltc and note the thumbprint you intend to use.
  4. Run slmgr /fta <thumbprint> <PIN>, supplying the PIN on the command line so there is no interactive prompt.
  5. Read the outcome with slmgr /dlv, and check the Application log for the Security-SPP entries around your attempt.

Supplying the PIN as an argument is not just a convenience. It is documented behaviour of the switch, and it removes an interactive step from a sequence that is otherwise easy to get wrong at the console of an isolated machine.

Revocation checking on an isolated network

A certificate whose revocation endpoints point at the internet, on a network that has no route to the internet, produces a slow failure rather than a fast one. That is worth knowing because a slow failure looks like a timeout, and a timeout invites the wrong diagnosis. Where your certificates name a revocation distribution point, make sure the isolated network can reach a copy of the list, or reissue certificates that point somewhere reachable.

What to collect before raising a case

  • slmgr /lil output, showing which issuance licences are installed.
  • slmgr /ltc output, showing which certificates the licensing service considers usable.
  • slmgr /dlv output, showing the current method and status.
  • The Application log filtered on the licensing sources, covering the time of your attempt.
  • The output of slui.exe 0x2a <code> for whichever code you were given, since that is Microsoft’s own wording for your build.

Every code this article covers

Code What it points at Source
0xC004F301 Reported during token-based activation. No published meaning; read the machine’s own text with slui.exe 0x2a not published by the vendor
0xC004F303 Reported during token-based activation, often alongside certificate validation problems. No published meaning not published by the vendor
0xC004F30C Reported during token-based activation. No published meaning not published by the vendor
Event ID 12321 Warning from Microsoft-Windows-Security-Licensing-SLC: Token Based Activation failed, HR=0xC004F011. The issuance licence is not installed, or the smart card certificates are not present. Harmless if you do not use token activation Microsoft Learn

Confirm the fix worked

  1. slmgr /lil lists the issuance licence you expect.
  2. slmgr /ltc lists the certificate you intend to activate with.
  3. slmgr /dlv reports a licence status of Licensed.
  4. No further Event ID 12321 warnings appear after your change, or – if the machine does not use token activation – you have confirmed the warning is safe to leave.
  5. Remove and reinsert the card, reboot, and confirm the activation state survives.

Questions people ask about this

I do not use token activation. Why is this event on my server?

Microsoft’s own guidance covers this: if you are not using token-based activation, the warning can be safely ignored and will not affect activation by KMS host machines or MAK keys. It is reporting that the issuance licence and card certificates are absent, which on your machine is expected.

Does Event ID 12321 mean a challenge timed out?

No. That reading was wrong and it used to be in this article’s title. Microsoft publishes the event as Token Based Activation failed with HR=0xC004F011, SL_E_LICENSE_FILE_NOT_INSTALLED, caused by the issuance licence not being installed or the smart card certificates not being present.

Do I have to buy a new licence after this?

No. The entitlement for token-based activation lives in the issuance licence, and a failed attempt does not consume anything. Every fix here is a file, a certificate or a configuration change.

Where do I find the detail behind the event?

The Application log, filtered on the licensing sources, around the time of the attempt. The event body names the stage that failed, which is more useful than the value shown at the console.

Does the machine lose activation while I troubleshoot?

If it was previously activated, no – a failed attempt does not revoke an existing activation. If it never activated, it stays in whatever state it was in and keeps working until that lapses.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix 0xC004F02C: Phone Activation Rejects Your Confirmation ID Format Free Fix 0xC004B007 and 0xC004FC03: Windows Cannot Reach the Activation Servers License Error 0xC004F050 and 0xC004C001: Windows Says This Product Key Is Invalid License Error 0x8004FE21 and 0x8004FE33: This Copy of Windows Is Not Genuine
โ† Back to Knowledge Base