Windows  ·  high  ·  Applications & Microsoft 365

Office says "Product Deactivated" or "Unlicensed Product"

Office cannot reach the licensing service, or the licence it holds belongs to an account that no longer has one assigned.

What you see

A red banner across every Office application, editing disabled, and a sign-in that appears to succeed without changing anything.

What is actually wrong

In order: the licence really has been unassigned in the tenant, the machine has a stale licence token, or the machine cannot reach the activation endpoints because of a proxy or firewall.

Codes and articles

Product DeactivatedUnlicensed Product0x80070005 office0x8004FC12subscription expired

Fixes (3)

Confirm the licence assignment before touching the client
Microsoft 365 admin centre10 minuteslow riskreversible

First, always. Half of these are exactly what the banner says.

  1. Check the user in the admin centre under Users → Active users → Licences and apps, and confirm both that a licence is assigned and that the Office apps are enabled within it.

  2. Check the subscription itself has not lapsed or run out of seats under Billing → Your products.

  3. If a licence was removed and re-added, allow up to 24 hours, or force the client to re-check once assigned.

    Re-assigning a licence does not push anything to the client. The client re-checks on its own schedule, and the steps below are how to make it do so now.

Confirm it workedThe admin centre shows an active licence with the Office desktop apps enabled.
If you need to undo itNot applicable.
Clear the licence token and re-activate
Elevated PowerShell25 minutesmedium riskreversible

The licence is definitely assigned but the client will not accept it.

  1. Close all Office applications.

  2. List the installed licences so you know what you are removing.

    Command Prompt
    cd 'C:\Program Files\Microsoft Office\Office16'cscript ospp.vbs /dstatus
  3. Clear the cached licence tokens.

    PowerShell
    Remove-Item "$env:LOCALAPPDATA\Microsoft\Office\Licenses" -Recurse -Force -ErrorAction SilentlyContinueRemove-Item "$env:LOCALAPPDATA\Microsoft\Office\16.0\Licensing" -Recurse -Force -ErrorAction SilentlyContinue

    This is where the subscription licence lives on a per-user basis. A token issued to an identity that has since changed will keep failing quietly, and no amount of signing in replaces it while it is still on disk.

  4. Clear the shared computer licensing token if this is a session host.

    PowerShell
    Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Office\16.0\Licensing" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force
  5. Remove the Office credentials as well, then start Word and sign in.

    PowerShell
    cmdkey /list | ForEach-Object { if ($_ -match 'Target:\s*(MicrosoftOffice\S+)') { cmdkey /delete:$($Matches[1]) } }
Confirm it workedThe banner is gone and the account shows under File → Account as a subscription product.
Command Prompt
cscript 'C:\Program Files\Microsoft Office\Office16\ospp.vbs' /dstatus
If you need to undo itTokens are re-issued on the next successful sign-in; nothing is permanently removed.
Open the path to the activation endpoints
Elevated PowerShell30 minuteslow riskreversible

Several machines on the same network are affected — the fault is the network, not the machines.

  1. Test the endpoints Office actually uses.

    PowerShell
    'login.microsoftonline.com','activation.sls.microsoft.com','ols.officeapps.live.com' |  ForEach-Object { Test-NetConnection $_ -Port 443 -InformationLevel Quiet |    ForEach-Object -Begin {} -Process { "$_" } }
  2. Check for TLS inspection on the firewall. A proxy that re-signs certificates breaks activation unless its root is trusted by the machine, and the error given is this one.

    The client is not told that a certificate was replaced — it simply fails to establish trust and reports the licence as unavailable. This is why activation can be the only thing broken on an otherwise working network.

  3. Check the machine-wide proxy, which services use even when the browser is fine.

    Command Prompt
    netsh winhttp show proxy
  4. Exempt the Microsoft 365 endpoints from inspection rather than from the firewall entirely.

Confirm it workedActivation completes on a test machine on the same network segment.
If you need to undo itFirewall changes should be recorded and are reversible in the firewall itself.

Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.