Fix it now
Microsoft publishes one description for 0xC004B003, 0xC004B004, 0xC004B005 and 0xC004B006: the activation server determined that the license is invalid. The machine reached Microsoft, presented the key you typed, and was refused. Nothing local is broken, so check which edition is actually installed before you do anything else.
cd "C:\Program Files\Microsoft Office\root\Office16"
cscript ospp.vbs /dstatus
cscript ospp.vbs /dhistoryacterr
- Read the product name in the output. Standard and Professional are separate products with separate keys, for both Visio and Project.
- Open the application and check File, then Account, then About, and compare the release there with the release your key was issued for. Perpetual keys do not roll forward.
- Only if the installed key genuinely does not belong here, remove it:
cscript ospp.vbs /unpkey:XXXXX, using the last five characters shown by /dstatus. - Install the correct key with
cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXXand activate withcscript ospp.vbs /act.
Before you run /unpkey, confirm you hold the full 25-character key or the licence record for it. /unpkey removes the key permanently and the last five characters shown by /dstatus are not enough to put it back.
If activation succeeds you can stop here. If the same refusal comes back, the next section explains what the service is comparing and why retrying cannot change the answer.
Why it happens
Volume and retail copies of Visio and Project carry a product key that encodes a specific product, edition and version. During activation the client sends that key with an installation identifier describing the build present on the machine, and the service compares the two. If the key does not cover that build it returns a refusal rather than a fault, and the 0xC004Bxxx range is where those refusals live.
Microsoft publishes the same sentence for all four codes in this group – the activation server determined that the license is invalid – so do not try to read a different meaning into 0xC004B004 than into 0xC004B003. The number tells you nothing about which detail was wrong. The service deliberately answers with one refusal for every kind of mismatch.
That is also why retrying does not help and repairing Office does not help. There is nothing on the machine to repair. Reinstalling with the same key produces the same answer, because the answer is computed at Microsoft’s end from information you have not changed. What does change the answer is either installing the build the key covers, or presenting the key that covers the build.
One command does help, and almost nobody uses it. cscript ospp.vbs /ddescr:<code> prints the description the licensing service holds for an error code, and /dhistoryacterr prints the failure history for MAK and retail activation on that machine. Between them they turn a dialog box into a record you can act on.
The key is for the other edition
You have this one if The product name in the status output reads Standard while the key was sold as Professional, or the reverse.
- Read the installed product name exactly. Project Standard and Project Professional are separate products, as are Visio Standard and Visio Professional.
- Decide which one this machine should have before removing anything.
- Either install the key that matches the installed edition, or redeploy the edition your key covers using the matching product ID in your configuration XML.
Retype keys by hand rather than pasting them. A soft hyphen or non-breaking space copied out of a PDF or an email breaks a key silently.
The key predates the installed release
You have this one if A key from an earlier perpetual release is being used on a newer build, confirmed under File, then Account, then About.
- Read the version from the About panel and compare it with the release the key was issued for.
- Accept that perpetual Visio and Project keys are version-locked; there is no upgrade path inside the key.
- Install the release the key covers using the matching product ID, or obtain the licence for the release you have.
The build is a subscription edition, so no key applies
You have this one if The activation prompt asks you to sign in rather than offering a box to type a key into.
- Do not type a key. Close the dialog and sign in with the account that holds the seat.
- Ask an administrator to confirm the assignment in the Microsoft 365 admin center under Users, then Active users, then the Licenses and Apps panel.
- If your organisation buys perpetual licences instead, redeploy using the volume product ID and then apply the key.
The activation pool is exhausted, or the key has been blocked
You have this one if The same key activated earlier machines successfully and now fails on new ones.
- Check the remaining activation count for that key through the licensing portal your agreement uses.
- If the count is exhausted, request an extension through your licensing channel or acquire additional licences.
- If the key came from outside a Microsoft agreement, assume it may have been blocked and stop reusing it across machines.
A blocked key produces the same refusal as a wrong key. The service does not distinguish between them in what it tells you.
You are running the command in the wrong folder
You have this one if cscript reports that it cannot find the script file, so no diagnosis happens at all.
- Use the Click-to-Run path:
C:\Program Files\Microsoft Office\root\Office16for 64-bit Office. - For 32-bit Office on 64-bit Windows, use
C:\Program Files (x86)\Microsoft Office\root\Office16. - Earlier releases may not include the root folder in the path; if root\Office16 does not exist, look for Office16 directly.
Full reference
Command reference for Office-family activation
| Command | What it does |
|---|---|
cscript ospp.vbs /dstatus |
Displays licence information for installed product keys, including the last five characters of each |
cscript ospp.vbs /dstatusall |
Displays licence information for all installed licences, not only the ones with keys |
cscript ospp.vbs /inpkey:<key> |
Installs a product key, replacing an existing one |
cscript ospp.vbs /unpkey:<last5> |
Uninstalls an installed key, identified by its last five characters |
cscript ospp.vbs /act |
Activates installed Office product keys |
cscript ospp.vbs /ddescr:<code> |
Displays the description the licensing service holds for an error code |
cscript ospp.vbs /dhistoryacterr |
Displays the failure history for MAK and retail activation |
cscript ospp.vbs /dinstid |
Displays the Installation ID, for activating by telephone |
/unpkey removes a key from the machine permanently. Reinstalling it needs the full 25 characters, and the last five that /dstatus shows you are not enough to reconstruct it. Confirm you hold the key on paper, in a licence file, or in your volume licensing record before you remove anything.
Matching the symptom to the mismatch
| What you see | What it points at |
|---|---|
| The status output names Standard and your key was sold as Professional | Edition mismatch |
| The About panel shows a newer release than the key was bought for | Version mismatch; perpetual keys do not roll forward |
| The build is a subscription edition and you are being asked for a key | Wrong activation method for that build |
| The key worked on earlier machines and now fails | Activation pool exhausted, or the key has been blocked |
| The key came from a marketplace listing | It may be invalid, resold, or outside the channel it was issued for |
cscript says it cannot find the script file |
Wrong folder; use the root\Office16 path |
Sharing a machine with Microsoft 365 Apps
A perpetual or volume-licensed Visio or Project alongside a subscription Office is a supported arrangement, not a licensing mistake, and it is worth knowing that before you start removing things. What Microsoft requires is that both products use the same installation technology, the same architecture and the same update channel, and that Microsoft 365 Apps is recent enough for the perpetual release involved.
- Both products must be Click-to-Run. A Click-to-Run product and an MSI-based product of the same version cannot share a machine.
- Both must be 32-bit or both 64-bit. Mixed architectures are not supported and setup fails.
- Both must be on the same update channel, which means configuring the volume-licensed product to match Microsoft 365 Apps.
- The 2024 perpetual releases need Microsoft 365 Apps version 2408 or later; the 2021 releases need 2108 or later; the 2019 releases need 1808 or later.
- Only subscription versions of Project and Visio receive regular feature updates. Volume-licensed ones do not, which is a planning fact rather than a fault.
Before you conclude you are a licence short
- Run
cscript ospp.vbs /dstatusalland read every entry, not just the one you expected to find. - Run
cscript ospp.vbs /dhistoryacterrand see what the service actually said on previous attempts. - Compare the product name and version from File, then Account, then About with what your licence record says you bought.
- Check whether an unused seat or an unapplied key already exists in your organisation. On estates of any size it usually does.
- Only then treat this as a purchase. The refusal is about the key, and no local command creates an entitlement.
When a licence is the actual fix
If the status output names a Project Professional build and the key you hold is anything else, no command reconciles the two and the licence is the fix. We supply Project Professional 2024 and the matching Visio editions as full licences, and we check the product name and version you read out of the About panel against the SKU before anything is issued, so nobody buys a Standard licence for a Professional install twice. Check your own records first: an unused seat or a key on an agreement nobody has looked at is common, and it costs nothing to rule out. If you are unsure whether your estate belongs on perpetual keys or subscription seats, tell us how the machines are managed and we will say which one actually fits.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0xC004B003 |
The activation server determined that the license is invalid | Microsoft Learn |
0xC004B004 |
Microsoft publishes the identical description: the activation server determined that the license is invalid | Microsoft Learn |
0xC004B005 |
Identical published description to 0xC004B003; the number does not narrow the cause | Microsoft Learn |
0xC004B006 |
Identical published description to 0xC004B003 | Microsoft Learn |
Confirm the fix worked
cscript ospp.vbs /dstatusreports a licensed status for the correct product name.- The last five characters of the installed key match the key you intended to use.
- File, then Account shows an activated product with no activation banner.
cscript ospp.vbs /dhistoryacterrshows no new failures after your last attempt.- Restart the machine, reopen the application and confirm activation has persisted.
Questions people ask about this
Can I convert a Standard key into a Professional one?
No. They are separate products and there is no command, patch or registry change that promotes one to the other. The upgrade path is buying the Professional licence.
Why do all four codes say the same thing?
Because Microsoft publishes one description for the group. The service answers a wrong edition, a wrong version, an exhausted pool and a blocked key with the same refusal, so the number in front of you does not narrow the search. The status and history commands do.
Does repairing Office help?
No. Repair fixes files. This is a decision made by a server about a key, and the same key gets the same decision after a repair.
Is there a free way to make this go away?
Only if the correct licence already exists somewhere in your organisation, which is genuinely worth checking: an unused seat, or a key on an agreement nobody has looked at. If it does not exist, this is one of the cases where buying the right licence is the only fix.
Can I run Visio next to my Microsoft 365 Office?
Yes, and it is supported. Both must be Click-to-Run, both the same architecture, both on the same update channel, and Microsoft 365 Apps has to be recent enough for the perpetual release you are adding. Mixing licensing models is not the problem people assume it is.
