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-20registry 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 cause | Typical clue | First fix |
|---|---|---|
Missing permissions on HKEY_USERS\S-1-5-20 | Fails right after a Windows update | Step 6 |
| Corrupted Office identity tokens | Repeated sign-in prompts | Step 7 |
| Blocked AAD BrokerPlugin | Activation hangs, then fails | Step 7 |
Corrupted tokens.dat | Licensing service errors in Event Viewer | Step 8 |
| Stale credentials in Credential Manager | Old account keeps being used | Step 4 |
| Controlled Folder Access blocking licensing files | Started after enabling ransomware protection | Step 9 |
| Click-to-Run service stopped | Office apps open slowly or fail to update | Step 11 |
| Stale work or school account | Wrong tenant is used for licensing | Step 10 |
| Damaged Office installation | Other Office features also misbehave | Step 5 |
| Antivirus or proxy interference | Fails only on one network | Step 5 |
Before You Start
Record the exact product, channel and activation state, so you can confirm the fix later.
- Open any Office app and go to File > Account.
- Note the product name (for example Microsoft 365 Apps for enterprise) and the update channel.
- Note whether the status reads Active, Product Activated or Product Activation Failed.
Get-CimInstance SoftwareLicensingProduct |
Where-Object { $_.Name -like "*Office*" -and $_.PartialProductKey } |
Select-Object Name, LicenseStatus, PartialProductKeyLicenseStatus 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.
- Close all Office applications.
- Right-click Start, choose Run, type
winword.exeand press Enter. - 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.
- Download the Microsoft Support and Recovery Assistant from
https://aka.ms/SaRA. - Install and launch it.
- Select Microsoft 365 > I need help with activation.
- Follow the prompts and let it apply the recommended fixes.
Step 4: Remove Stale Office Credentials
- Open Control Panel > Credential Manager > Windows Credentials.
- Look for entries containing
MicrosoftOffice16,MicrosoftOfficeorMicrosoft.AAD. - Click the arrow next to each entry and select Remove.
- Close Credential Manager and restart the computer.
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.
- Open Settings > Apps > Installed apps.
- Find Microsoft 365, click the three dots and select Modify.
- Run Quick Repair first.
- If the problem persists, run Online Repair.
- Restart and try activating again.
| Repair type | Time | Needs internet | Preserves documents |
|---|---|---|---|
| Quick Repair | 5 to 10 minutes | No | Yes |
| Online Repair | 20 to 45 minutes | Yes | Yes |
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.
- Press Windows key + R, type
regeditand press Enter. - Navigate to
HKEY_USERSand locateS-1-5-20(NETWORK SERVICE). - Right-click
S-1-5-20, choose Permissions, and add the current Windows user with Full Control. - Select NETWORK SERVICE in the list, open Advanced, click Edit and grant Full Control.
- Tick Replace all child object permission entries with inheritable permission entries from this object.
- Click OK through every dialog, close Registry Editor and restart.
$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 $aclStep 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.
- Open File Explorer and navigate to
%LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts. - Delete all files and folders in that location.
- Navigate to
%LOCALAPPDATA%\Packages\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\AC\TokenBroker\Accounts. - Delete all files and folders there as well.
- Restart the computer.
$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.
- Open Terminal (Admin).
- Stop the Software Licensing service.
- Rename the file.
- Start the service again.
- Run an Online Repair of Office, then restart.
net stop sppsvc
Rename-Item C:\Windows\System32\spp\store\2.0\tokens.dat tokens.old -ErrorAction SilentlyContinue
net start sppsvcA 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.
- Open Settings > Privacy & security > Windows Security > Virus & threat protection.
- Under Ransomware protection, open Manage ransomware protection.
- Switch Controlled folder access to Off temporarily.
- Try activating Office.
- 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
- Open Settings > Accounts > Access work or school.
- Select any account that is stale or belongs to a previous organisation.
- Click Disconnect and confirm.
- Restart and try activating again.
dsregcmd /statusCheck 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
- Press Windows key + R, type
services.mscand press Enter. - Scroll to Microsoft Office Click-to-Run Service.
- Right-click and select Restart.
- Set Startup type to Automatic if it is not already.
- Restart the computer.
Get-Service ClickToRunSvc | Select-Object Name, Status, StartType
Restart-Service ClickToRunSvc -ForceStep 12: Reset Activation State with PowerShell
For administrators, the safe parts of the reset can be scripted.
$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, LicenseStatusVerify the Fix
| Check | Before (broken) | After (fixed) |
|---|---|---|
| File > Account | "Product Activation Failed" | "Product Activated" |
LicenseStatus | 0 or 5 | 1 |
| Event Viewer > Application | Licensing-Service 0x80070005 | No new licensing errors |
| Editing a document | Read-only mode | Editing enabled |
| Reboot, then open Word | Banner returns | No 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.
Related Guides and Tools
- Windows Activation Troubleshooter - diagnose activation and licensing errors for Windows and Office.
- Windows Error Code Lookup - decode 0x80070005 and any other
0xcode. - Event Viewer Log Analyzer - interpret Licensing-Service and Application Error entries.
- Password Strength Checker - confirm the account password meets tenant policy before retrying sign-in.
- Outlook Not Opening on Windows 11 - the same identity faults also stop Outlook from launching.
- Fix Windows 11 Update Error 0x800f0982 - the update failures that often reset permissions.
- Fix Network Printer Not Connecting - another Windows 11 issue worth ruling out.
- IT Troubleshooting Center - browse all Windows and networking guides.
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.