Fix it now
Microsoft publishes no meaning for 0xC004F031 or the codes that travel with it, so work from what you can test rather than from the digits. The reliable move is to read the Installation ID the machine has now, obtain a Confirmation ID against that value, and apply it before anything else touches the machine.
slmgr /dti
slmgr /atp <Confirmation ID>
slmgr /dli
slmgr /xpr
- Do not reboot and do not reinstall the key. Both regenerate the value you are trying to match.
- Run
slmgr /dtiand compare what it prints with the Installation ID you were working from. A difference in one group is the whole explanation. - Obtain a Confirmation ID against the value showing now, and apply it with
slmgr /atpin the same session. - For Active Directory-Based Activation the equivalent pair is
slmgr /ad-activation-get-IID <ProductKey>andslmgr /ad-activation-apply-cid <ProductKey> <Confirmation ID>. - Confirm with
slmgr /dliandslmgr /xprbefore moving on to the next machine.
Nothing is consumed by a failed attempt. You can restart the exchange as many times as you need to without spending an activation.
If activation completes, you are done. If it refuses again, the next section covers what to rule out and in what order.
Why it happens
Offline activation pairs two values. Windows produces an Installation ID, Microsoft produces a Confirmation ID for that specific Installation ID, and Windows will not accept half a pair. When the machine changes between the two halves, the value you were given stops matching the value the machine now has, and activation fails with nothing wrong on either side of the conversation.
That is the working explanation for 0xC004F031, and it is worth being clear that it is a working explanation rather than a documented one. Microsoft publishes no meaning for 0xC004F031, and none for 0xC004F030, 0xC004F032, 0xC004F07E or 0xC004F07F either. What is documented is the exchange itself: slmgr /dti to display the Installation ID, slmgr /atp to activate with a Confirmation ID, and the Active Directory equivalents. Testing against those is more useful than any explanation of the code.
The test is direct. Run slmgr /dti and compare its output with the Installation ID you were working from. If they differ, the machine has moved and a fresh exchange is the answer. If they are identical, the pair is not the problem and you are looking at a validation failure or a wrong value instead, which the codes in the neighbouring articles describe.
0xC004F07E deserves a note of its own because of where readers usually meet it: applying a Confirmation ID to Active Directory-Based Activation with slmgr /ad-activation-apply-cid. That is the same exchange in a different place, with a product key as a third value in the pairing, and it has its own ways of going wrong that have nothing to do with the machine you are typing on.
The key was reinstalled between the two halves
You have this one if Someone ran slmgr /ipk again, or a management tool pushed the key, after the Installation ID was collected.
- Leave the key alone from this point on.
- Read the current Installation ID with
slmgr /dti. - Obtain and apply a fresh Confirmation ID in the same session.
A reboot, rearm or repair happened mid-exchange
You have this one if The machine restarted, or a repair step ran, between reading the ID and applying the confirmation.
- Finish all pending work on the machine first, including restarts and updates.
- Only then start the exchange, and complete it without interruption.
- If a repair is genuinely needed, do it before the exchange rather than during it.
slmgr /rearm resets activation timers and is called by sysprep /generalize, so a generalise step in the middle of an activation session is a reliable way to produce this.
A virtual machine was reverted or cloned
You have this one if The device is a virtual machine, and a snapshot was applied or the guest cloned during the session.
- Settle the guest in its final state before starting activation.
- Read a fresh Installation ID from the machine as it will stay.
- Complete the exchange, and take your snapshot afterwards rather than before.
Two machines, one ticket
You have this one if Several devices were being activated in one session and the values have been crossed.
- Handle one machine at a time and finish each before starting the next.
- Record the Installation ID alongside the machine name, never on its own.
- For more than a handful of devices, use VAMT proxy activation, which pairs the values automatically.
It is the Active Directory exchange, not the machine
You have this one if 0xC004F07E while running slmgr /ad-activation-apply-cid on a domain controller.
- Re-run
slmgr /ad-activation-get-IID <ProductKey>and use the Installation ID it returns. - Check that the product key in the apply command is character-for-character the one used to get the Installation ID.
- Confirm the account has read and write access to the activation object container in the root domain.
- Run both halves from the same domain controller in the same session.
Full reference
What changed between the two steps
| What happened in between | Effect on the exchange |
|---|---|
| A different product key was installed | The Installation ID changes; the Confirmation ID you hold is dead |
slmgr /rearm ran, or the machine was generalised |
Activation timers were reset mid-exchange |
| The machine was rebuilt or reimaged | Start again; nothing collected beforehand survives |
| A virtual machine was reverted to a snapshot | Everything reverted, including what the ID was derived from |
| The disk was moved to different hardware | A different machine as far as activation is concerned |
| Nothing changed on the machine | Check whether the value came from a different device or a different product |
Commands for both forms of the exchange
| Command | Where it applies |
|---|---|
slmgr /dti |
Displays the Installation ID for offline activation of this machine |
slmgr /atp <Confirmation ID> |
Activates this machine with the Confirmation ID supplied |
slui 4 |
Opens the phone activation dialog, if you prefer it to the commands |
slmgr /ad-activation-get-IID <ProductKey> |
Starts Active Directory-Based Activation in phone mode and returns its Installation ID |
slmgr /ad-activation-apply-cid <ProductKey> <Confirmation ID> |
Completes Active Directory-Based Activation from the telephone call |
slmgr /ao-list |
Lists the activation objects available to the local computer |
slmgr /dli |
Confirms licence status afterwards |
The Active Directory commands need read and write access to the activation object container in the root domain rather than local administrator rights on the domain controller. That distinction catches people out and produces failures that look like value problems.
Doing this so it works the first time
- Finish everything else on the machine: updates, restarts, key installation, repairs, imaging.
- Confirm the installed key with
slmgr /dli. - Read the Installation ID with
slmgr /dtiand copy it rather than transcribing it. - Obtain the Confirmation ID for that value.
- Apply it with
slmgr /atpand confirm withslmgr /dliandslmgr /xpr, all in the same sitting.
Plan the exchange as the last thing you do on a machine rather than something to slot in while other work is running. Almost every instance of this failure comes from doing it in the middle of a build.
When to stop doing this by hand
Above a handful of machines, VAMT proxy activation is the answer. It collects Installation IDs from clients over WMI, sends the batch from a machine with internet access, receives the Confirmation IDs and writes them back, pairing each value with the machine it came from. That removes both the transcription errors and the crossed-values mistakes in one move.
The documented run is to select the products, then Activate, then Proxy activate, then Apply Confirmation ID, apply to selected machine(s) and activate. It needs administrative permissions on the targets and WMI reachable through the firewall, which is worth arranging once rather than repeating a manual exchange thirty times.
What this does not cost you
- No activation is consumed. Only successful activations spend anything.
- No key is invalidated. The same key works the moment the values line up.
- No support call is needed for the ordinary case; the exchange can simply be repeated.
- No reinstall is called for. Nothing about the installation is damaged.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0xC004F031 |
Returned during offline activation when the Confirmation ID is not accepted for this machine. Microsoft publishes no meaning for it; test by comparing slmgr /dti with the ID you were working from |
not published by the vendor |
0xC004F030 |
Another offline activation refusal in the same area. No published meaning | not published by the vendor |
0xC004F032 |
Reported in the same exchange. No published meaning; read it as a reason to restart the exchange rather than to repair the machine | not published by the vendor |
0xC004F07E |
Most often seen while applying a Confirmation ID to Active Directory-Based Activation. No published meaning | not published by the vendor |
0xC004F07F |
In the same group of refusals raised during offline activation. No published meaning | not published by the vendor |
Confirm the fix worked
- The activation completes rather than returning an error.
slmgr /dlireports Licence Status: Licensed.slmgr /xprreports permanent activation rather than a grace window.- For Active Directory-Based Activation,
slmgr /ao-listshows the activation object you created. - Reboot once and re-check, so you know the state survived a restart.
Questions people ask about this
Can the same Confirmation ID be reissued instead of starting again?
There would be no point. The value is computed for one Installation ID, so once that has changed the only useful value is a new one computed against the new ID.
Does a failed attempt use up an activation?
No. Activations are consumed by successful activations, not by refused ones, so you can restart the exchange as many times as you need.
Why does this keep happening on virtual machines?
Because snapshots and clones move a machine’s identity in ways physical hardware does not. Finish the guest, then activate it, then take the snapshot. Any other order invites exactly this.
Is there a documented meaning for 0xC004F031?
No. Microsoft publishes no meaning for it, nor for the four codes that travel with it. What is documented is the exchange itself, which is why the useful test is comparing slmgr /dti against the Installation ID you were holding rather than looking the code up.
Is there a way to avoid the manual pairing entirely?
Yes, for anything above a handful of machines. VAMT proxy activation collects Installation IDs and applies the returned Confirmation IDs automatically, which removes both the transcription errors and the pairing mistakes.
