Fix Office Activation Error 0x80070005 in Windows 11 (2026 Guide)

Introduction

Office activation error 0x80070005 is an Access Denied error that prevents Microsoft 365 or Office 2021/2024 from completing activation. When it occurs, Office applications launch in reduced functionality mode with "Product Activation Failed" or "We couldn't activate Microsoft 365" banners, and editing features are blocked. The error usually appears after a Windows update, a user account change, or a security software update that altered critical permissions.

Error 0x80070005 means "Access is denied". In the context of Office activation, the licensing system (the Software Licensing Service and the Office identity service) cannot read or write a protected registry key, file or folder. Which resource is denied decides which fix works, which is why a single solution does not resolve every case.

This guide covers twelve fixes in order of least disruption, with copy-ready commands, expected output, a root-cause table and a before-and-after check.

Problem Description

When an Office application launches after installation or after a Windows update, it shows an activation prompt. After credentials are entered, activation begins and then fails with 0x80070005. In some cases Office silently enters reduced functionality mode without displaying the code at all.

Activation needs all of the following to succeed:

  • Write access to the HKEY_USERS\S-1-5-20 registry hive.
  • Read and write access to licensing files in C:\Windows\System32\spp\store\2.0.
  • The Software Licensing Service (sppsvc) running correctly.
  • The Microsoft Office Click-to-Run Service running correctly.
  • A valid authentication token from Microsoft.
  • Unblocked communication with the activation endpoints.

When any one of these is missing, activation fails with 0x80070005.

Symptoms

  • "We're sorry, something went wrong and we can't do this for you right now. (0x80070005)".
  • Office products show "Product Activation Failed" in the title bar.
  • "Access Denied" appears during activation.
  • Office works in read-only mode with editing disabled.
  • Activation banners appear persistently.
  • Activation succeeds on one Windows account but fails on another.
  • The error appears immediately after entering Microsoft 365 credentials.
  • Event Viewer shows Licensing-Service errors with code 0x80070005.
  • Office deactivates after a Windows update and cannot reactivate.

Root Causes

Root causeTypical clueFirst fix
Missing permissions on HKEY_USERS\S-1-5-20Fails right after a Windows updateStep 6
Corrupted Office identity tokensRepeated sign-in promptsStep 7
Blocked AAD BrokerPluginActivation hangs, then failsStep 7
Corrupted tokens.datLicensing service errors in Event ViewerStep 8
Stale credentials in Credential ManagerOld account keeps being usedStep 4
Controlled Folder Access blocking licensing filesStarted after enabling ransomware protectionStep 9
Click-to-Run service stoppedOffice apps open slowly or fail to updateStep 11
Stale work or school accountWrong tenant is used for licensingStep 10
Damaged Office installationOther Office features also misbehaveStep 5
Antivirus or proxy interferenceFails only on one networkStep 5

Before You Start

Record the exact product, channel and activation state, so you can confirm the fix later.

  1. Open any Office app and go to File > Account.
  2. Note the product name (for example Microsoft 365 Apps for enterprise) and the update channel.
  3. Note whether the status reads Active, Product Activated or Product Activation Failed.
PowerShell
Get-CimInstance SoftwareLicensingProduct |
  Where-Object { $_.Name -like "*Office*" -and $_.PartialProductKey } |
  Select-Object Name, LicenseStatus, PartialProductKey

LicenseStatus values: 0 = unlicensed, 1 = licensed, 2 = out-of-box grace, 5 = notification mode. A healthy activated install reports 1.

Step 1: Sign Out and Sign Back In

Refresh the activation state before anything else. Open any Office app, go to File > Account, click Sign out, close every Office application, reopen Word and sign back in.

This refreshes the local identity tokens and resolves a meaningful share of identity-related 0x80070005 errors without any deeper change.

Step 2: Run Office as Administrator

Elevated privileges bypass permission restrictions that block activation.

  1. Close all Office applications.
  2. Right-click Start, choose Run, type winword.exe and press Enter.
  3. In Word, open File > Account and try activating.

If activation succeeds only when elevated, permissions are almost certainly the cause and Step 6 is the real fix.

Step 3: Run the Microsoft 365 Activation Troubleshooter

Microsoft provides an automated tool for activation problems.

  1. Download the Microsoft Support and Recovery Assistant from https://aka.ms/SaRA.
  2. Install and launch it.
  3. Select Microsoft 365 > I need help with activation.
  4. Follow the prompts and let it apply the recommended fixes.

Step 4: Remove Stale Office Credentials

  1. Open Control Panel > Credential Manager > Windows Credentials.
  2. Look for entries containing MicrosoftOffice16, MicrosoftOffice or Microsoft.AAD.
  3. Click the arrow next to each entry and select Remove.
  4. Close Credential Manager and restart the computer.
PowerShell
cmdkey /list | Select-String -Pattern "MicrosoftOffice|Microsoft.AAD|MicrosoftAccount"

Delete a specific entry with cmdkey /delete:<target-name>. Reopen Office afterwards and sign in with the correct account.

Step 5: Repair the Office Installation

A corrupted Office installation can trigger activation failures even when permissions are correct.

  1. Open Settings > Apps > Installed apps.
  2. Find Microsoft 365, click the three dots and select Modify.
  3. Run Quick Repair first.
  4. If the problem persists, run Online Repair.
  5. Restart and try activating again.
Repair typeTimeNeeds internetPreserves documents
Quick Repair5 to 10 minutesNoYes
Online Repair20 to 45 minutesYesYes

Step 6: Fix Registry Permissions for NETWORK SERVICE

This is the most effective fix for 0x80070005 that appears after a Windows update. Windows updates can reset the ACLs on the S-1-5-20 hive, which is the NETWORK SERVICE account that Office licensing uses.

  1. Press Windows key + R, type regedit and press Enter.
  2. Navigate to HKEY_USERS and locate S-1-5-20 (NETWORK SERVICE).
  3. Right-click S-1-5-20, choose Permissions, and add the current Windows user with Full Control.
  4. Select NETWORK SERVICE in the list, open Advanced, click Edit and grant Full Control.
  5. Tick Replace all child object permission entries with inheritable permission entries from this object.
  6. Click OK through every dialog, close Registry Editor and restart.
PowerShell
$key = 'Registry::HKEY_USERS\S-1-5-20'
$acl = Get-Acl $key
$rule = New-Object System.Security.AccessControl.RegistryAccessRule(
  'NT AUTHORITY\NETWORK SERVICE', 'FullControl',
  'ContainerInherit,ObjectInherit', 'None', 'Allow')
$acl.SetAccessRule($rule)
Set-Acl -Path $key -AclObject $acl

Step 7: Delete the AAD BrokerPlugin Token Files

Close every Office application before deleting the token caches. They are recreated automatically on the next sign-in.

  1. Open File Explorer and navigate to %LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts.
  2. Delete all files and folders in that location.
  3. Navigate to %LOCALAPPDATA%\Packages\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\AC\TokenBroker\Accounts.
  4. Delete all files and folders there as well.
  5. Restart the computer.
PowerShell
$paths = @(
  "$env:LOCALAPPDATA\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts",
  "$env:LOCALAPPDATA\Packages\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\AC\TokenBroker\Accounts"
)
foreach ($p in $paths) {
  if (Test-Path $p) { Get-ChildItem $p -Force | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue }
}

Step 8: Rename the tokens.dat File

The tokens.dat file holds Software Licensing state. Renaming it forces Windows to rebuild the licensing store.

  1. Open Terminal (Admin).
  2. Stop the Software Licensing service.
  3. Rename the file.
  4. Start the service again.
  5. Run an Online Repair of Office, then restart.
PowerShell
net stop sppsvc
Rename-Item C:\Windows\System32\spp\store\2.0\tokens.dat tokens.old -ErrorAction SilentlyContinue
net start sppsvc

A new tokens.dat is generated when an Office app launches and triggers activation. If the file is locked, the service did not stop cleanly; check Get-Service sppsvc before retrying.

Step 9: Disable Controlled Folder Access Temporarily

Windows Defender Controlled Folder Access can block Office licensing files from being modified.

  1. Open Settings > Privacy & security > Windows Security > Virus & threat protection.
  2. Under Ransomware protection, open Manage ransomware protection.
  3. Switch Controlled folder access to Off temporarily.
  4. Try activating Office.
  5. Re-enable Controlled Folder Access afterwards.

If activation succeeds only with the feature disabled, add the Office licensing folders to the allowed list instead of leaving the protection off.

Step 10: Remove Stale Work or School Accounts

  1. Open Settings > Accounts > Access work or school.
  2. Select any account that is stale or belongs to a previous organisation.
  3. Click Disconnect and confirm.
  4. Restart and try activating again.
PowerShell
dsregcmd /status

Check the Workplace and AzureAdJoined sections. A device joined to the wrong tenant is a common cause of activation failure in managed environments.

Step 11: Restart the Click-to-Run Service

  1. Press Windows key + R, type services.msc and press Enter.
  2. Scroll to Microsoft Office Click-to-Run Service.
  3. Right-click and select Restart.
  4. Set Startup type to Automatic if it is not already.
  5. Restart the computer.
PowerShell
Get-Service ClickToRunSvc | Select-Object Name, Status, StartType
Restart-Service ClickToRunSvc -Force

Step 12: Reset Activation State with PowerShell

For administrators, the safe parts of the reset can be scripted.

PowerShell
$ErrorActionPreference = 'Continue'

# 1. Clear stale Office credentials
cmdkey /list | Select-String -Pattern 'MicrosoftOffice|Microsoft.AAD' |
  ForEach-Object {
    if ($_ -match '(Target:\s*)(\S+)') { cmdkey /delete:$($Matches[2]) }
  }

# 2. Clear token broker caches
Get-ChildItem "$env:LOCALAPPDATA\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts" -Force -ErrorAction SilentlyContinue |
  Remove-Item -Recurse -Force -ErrorAction SilentlyContinue

# 3. Restart licensing services
Restart-Service ClickToRunSvc -Force -ErrorAction SilentlyContinue
Restart-Service sppsvc -Force -ErrorAction SilentlyContinue

# 4. Report state
Get-CimInstance SoftwareLicensingProduct |
  Where-Object { $_.Name -like '*Office*' -and $_.PartialProductKey } |
  Select-Object Name, LicenseStatus

Verify the Fix

CheckBefore (broken)After (fixed)
File > Account"Product Activation Failed""Product Activated"
LicenseStatus0 or 51
Event Viewer > ApplicationLicensing-Service 0x80070005No new licensing errors
Editing a documentRead-only modeEditing enabled
Reboot, then open WordBanner returnsNo banner

Frequently Asked Questions

What does error 0x80070005 mean for Office activation?

It means Access Denied. The Office licensing system cannot reach the files or registry keys it needs to complete activation.

Will I lose my Office data if I repair Office?

No. Quick Repair and Online Repair preserve documents, templates and settings. Only program files are replaced.

How do I know if registry permissions are causing the error?

Check Event Viewer for Licensing-Service errors with 0x80070005, and try running Office as administrator. If activation works elevated, permissions are the likely cause.

Can antivirus software cause activation error 0x80070005?

Yes. Antivirus and proxy software can block the AAD BrokerPlugin process and licensing file access. Temporarily disable web protection to test.

How long does a tokens.dat regeneration take?

The rename is instant. The new tokens.dat is created when an Office app launches and triggers activation, usually within a minute.

What is the S-1-5-20 registry key?

It represents the NETWORK SERVICE account. Office licensing uses that account to validate and store activation state.

Do I need admin rights to fix 0x80070005?

Yes. Every fix here requires administrative privileges. Contact IT if the account is not an administrator.

Will uninstalling and reinstalling Office fix this error?

In most cases yes, but try the registry and token fixes first. They are faster and preserve every setting.

Why does 0x80070005 appear after a Windows update?

Windows updates can reset registry permissions, change the S-1-5-20 ACLs or alter service configuration, all of which break Office activation.

Can I activate Office by phone instead?

Yes. Microsoft offers phone activation. The number depends on region and appears during the activation flow.

What is the Microsoft AAD BrokerPlugin?

A system component that handles modern authentication for Microsoft 365. When it is blocked or its cache is corrupted, activation fails.

How do I verify that Office is activated?

Open any Office app, go to File > Account, and confirm the subscription or product shows Active or Activated.

Conclusion

Office activation error 0x80070005 is an Access Denied error caused by registry permission problems, corrupted licensing tokens or blocked authentication processes. The highest-success fixes are restoring permissions on HKEY_USERS\S-1-5-20, removing stale credentials and clearing the AAD BrokerPlugin cache, in that order.

For most users, Steps 1 to 3 (sign out and in, run as administrator, SaRA) resolve the issue. For persistent cases, the registry permission fix in Step 6 and the tokens.dat rename in Step 8 have the best record. Administrators can use the Step 12 script to reset activation state across many workstations.

If every method fails, the problem may be on the tenant side. Verify licence assignment in the Microsoft 365 admin console, check conditional access policies, and confirm the device is not joined to a different tenant with dsregcmd /status.

We Value Your Privacy

We use cookies to improve your browsing experience, analyze traffic, and display relevant advertisements.