Scenarios for this code
The same code shows up in multiple contexts. Pick the surface where you saw it to jump straight to the matching fix.
Error 0x80070005: What It Means and How to Fix It (2026 Updated Guide)
Quick answer
0x80070005 translates as Access Denied. It’s not a Windows error in the traditional sense — it’s the operating system telling whatever asked for permission that the answer is no. The fix isn’t a single script or registry edit. It depends entirely on what was denied. The same code shows up when Windows Update can’t write to its data store, when Office can’t activate, when OneDrive can’t sync, and when an installer can’t touch a system folder. These are four different problems wearing the same uniform. Identify the scenario first, then go to the matching fix.
Before you start
A few things to settle before you change anything.
- Don’t run a “0x80070005 fixer” tool. Most are bundled with PC-optimizer software that will create a different problem to solve. Nothing about Access Denied requires third-party software to repair.
- Don’t edit the registry blind. A fair amount of older advice for
0x80070005involves registry permission changes that can leave Windows in a worse state than the original error. Only do this when the scenario specifically calls for it and you’ve read the warning attached. - Note where the error appeared. Was it Windows Update? An Office app? OneDrive? A specific installer? The screen you were on when the error fired is the most important diagnostic clue you have. Write it down before you start clicking around.
- If this is a work or school device, there’s a non-trivial chance the cause is a deliberate policy from your IT team, not a fault. The fixes below assume a personal or unmanaged device unless explicitly stated.
What this error means
At the system level, 0x80070005 is the Win32 representation of ERROR_ACCESS_DENIED — a hex code mapping to a flat refusal from Windows that the action wasn’t permitted. Microsoft documents this in the Win32 system error code reference.
What “permitted” means depends on which subsystem was asking. For a Windows Update operation, permitted means having write access to update-related folders, having the Windows Update services running with the right identity, and having the right privileges to install updates. For Office activation, permitted means having a valid token, a working modern-auth path to Microsoft, and an Office Identity service that can write to its protected data folder. For OneDrive, permitted means having permission on the local sync folder, on the cloud-side resource, and on the user-token cache. For an installer, permitted means the running process has the privileges it needs and the target folder hasn’t been locked by another process.
Different subsystems, different definitions of “permitted,” same error code. That’s why the generic fix lists you find in older articles (“run as administrator and disable your antivirus”) work occasionally but fail often. They’re aiming a single tool at four different problems.
Where this error appears
Five common surfaces produce 0x80070005. The fix differs in each.
1. Windows Update
The most common context. The error appears when Windows Update can’t read or write to the SoftwareDistribution folder, when the TrustedInstaller service isn’t running properly, or when the update files have been partially downloaded and become unreadable. This usually shows up as “There were problems installing some updates, but we’ll try again later” with 0x80070005 listed in the details.
→ See: the 0x80070005 Windows Update scenario
2. Microsoft 365 / Office activation
Less common but more disruptive. Office launches, asks for sign-in, accepts the credentials, then fails to activate with 0x80070005. Sometimes it shows as “We couldn’t activate Microsoft 365.” Sometimes Office quietly drops into reduced functionality mode without naming the code. This surface has its own diagnostic path because the underlying problem is usually identity-related, not a file permission.
→ See: Office activation error 0x80070005
3. OneDrive sync
Less common, but it does happen. Usually triggered when OneDrive tries to write to a folder that has had its inherited permissions broken — a common after-effect of restoring files from a backup that didn’t preserve ACLs cleanly. OneDrive itself usually surfaces the underlying cause as 0x8004de40 rather than 0x80070005, but 0x80070005 shows up in the OneDrive log files when ACL repair is needed.
→ See: OneDrive error 0x8004de40
4. Software installation
A standalone installer (an .msi, an .exe, a Windows Store install) returns 0x80070005 part-way through. The cause is usually one of three things: the installer is trying to write to a protected folder without elevation, an antivirus product is blocking the file write in real time, or another process is holding the target file open.
5. System administration tasks
Things like trying to schedule a task, change a service start type, or modify a system-protected file. The cause here is almost always permissions on the object you’re trying to modify — sometimes intentional, sometimes the result of broken inheritance. Treat with care.
Common causes
Across all five surfaces, the underlying causes consolidate into six recurring patterns. The fixes you’ll see in the scenario articles map onto these.
| Cause | Surfaces it commonly hits | What’s actually wrong |
|---|---|---|
| Service-account permission lost | Windows Update, OneDrive, Office | The service that needs to write somewhere doesn’t have the identity it normally runs under, usually because of corruption in the local SAM or a broken SID mapping |
| Folder ACL broken | OneDrive, installers, Office | The file or folder lost its inherited permissions, often after a restore, a profile move, or a third-party tool that “cleaned” permissions |
| Antivirus real-time block | All | Endpoint protection is intercepting the write and Windows reports the block as Access Denied without naming the AV |
| TrustedInstaller misbehavior | Windows Update, system updates | The Windows Modules Installer service isn’t running with the right token, often after a broken servicing operation |
| Modern-auth token corruption | Office activation | The Office Identity service has a stale or corrupted token in %LOCALAPPDATA%\Microsoft\OneAuth and can’t refresh it |
| Group policy lockdown | Work/school devices | A deliberate policy is blocking the operation. Not a fault — a configuration |
Fixes to try first
These are the safe, low-risk actions worth attempting before you go to the scenario article. They resolve a meaningful share of cases on personal devices regardless of context.
- Restart the device. Not a joke. A surprising number of
0x80070005cases are transient — a service was in a bad state and a clean reboot resets it. Try this before doing anything else. If the error is gone, you’re done. - Sign out and sign back in. If the error came from an Office app, OneDrive, or anything tied to your Microsoft account, sign out fully (not just close), wait twenty seconds, sign back in. This refreshes the local identity tokens, which fixes a meaningful share of identity-related cases.
- Check whether your antivirus is the cause. Open your AV’s quarantine or activity log. If you see entries from the last few minutes referencing the file or folder Windows was trying to touch, that’s your answer. Don’t disable the AV permanently — add an exclusion for the specific folder or temporarily pause real-time scanning while you retry the operation.
- Run the operation as Administrator if it lets you. Right-click the application or the installer and choose “Run as administrator.” Note: this won’t help with Windows Update or Office activation — those services already run with elevated privileges. It’ll only help with installers and certain admin-side tools.
- Check disk space. A nearly-full system drive can produce
0x80070005in some Windows Update scenarios because the update can’t expand its working set. IfC:has under 10 GB free, free up space before troubleshooting further.
If none of those resolved it, you need to go to the specific scenario page. The fixes from this point on are different per surface.
Advanced fixes
The “advanced fixes” for 0x80070005 are entirely scenario-dependent. There is no single advanced fix for this code. What you do next depends on where it appeared.
For Windows Update, the advanced path involves resetting the SoftwareDistribution folder, repairing the TrustedInstaller service, and running DISM and SFC against the component store. → 0x80070005 Windows Update scenario
For Office activation, the advanced path involves clearing the Office Identity cache, removing stale work or school accounts, and forcing a fresh modern-auth handshake — none of which is something you’d do for the Windows Update version. → Office activation error 0x80070005
For OneDrive, the path is repairing the local folder ACLs, resetting the OneDrive client, and verifying the cloud-side resource permissions. → OneDrive error 0x8004de40
If you treat the advanced fixes as interchangeable, you’ll spend an hour applying the wrong solution to the right problem and conclude that the article was wrong. It wasn’t — you were on the wrong page.
If you are on a work or school device
Three things to check before you do anything else.
First, check whether your IT team has issued a known-issue notice. Many corporate environments push out advisories when a Windows Update or Office change starts producing 0x80070005 at scale. If they’ve already identified the cause, you’ll save time waiting for their fix rather than running your own.
Second, do not run elevated commands without authorization. On a managed device, scripts that reset SoftwareDistribution or clear the Office Identity cache may violate your acceptable use policy and may produce telemetry that lights up your security team’s dashboard. Ask before you act.
Third, recognize that a deliberate policy may be the cause. Conditional Access in Microsoft Entra ID can block sign-in to Office on a non-compliant device, and the failure surfaces as 0x80070005 rather than as a clear “blocked by policy” message. If the device hasn’t been to the office in a while, hasn’t completed a Windows Update, hasn’t been encrypted, or isn’t reporting to Intune, you may be hitting policy rather than a fault.
When to stop
Stop and escalate (or back up and reinstall) if any of the following is true.
- The error is reproducing across multiple unrelated surfaces — Windows Update, Office, and OneDrive all hitting
0x80070005at the same time. That’s not coincidence; that’s a broader system corruption (most often the local profile, the Windows component store, or the security database). Continuing to apply scenario-specific fixes will not resolve it. The right action is a full DISM/SFC pass and, if that fails, a profile rebuild or in-place reinstall. - You’ve already attempted ACL or registry permission changes and the situation has worsened. Roll back, restore from backup, or factory reset. Don’t keep editing.
- Critical data is at risk. If
0x80070005is preventing OneDrive from syncing files you don’t have a local copy of, stop troubleshooting and prioritize getting the data out (web access to OneDrive in a browser will let you download manually) before you try anything that might change the local sync state. - You’re on a work device and your IT team should be told. They have visibility you don’t. Open a ticket.
The point of stopping is the same point that runs through every fix on this site: it is always cheaper to recover than to repair when there’s data on the line.
Related errors
- 0x80070005 Windows Update scenario — the most common surface
- Office activation error 0x80070005 — the highest-impact surface
- OneDrive error 0x8004de40 — the related sync code
- Windows Update error 0x80070643 — frequently appears alongside 0x80070005 on the same machine
Official references
- Microsoft Learn — Win32 System Error Codes (0–499)
- Microsoft Support — Fix Windows Update errors
- Microsoft Learn — Office activation troubleshooting
FAQ
Is 0x80070005 a virus? No. It’s a Windows error code meaning Access Denied. There are scenarios where overzealous antivirus software causes the error by blocking a legitimate operation, but the code itself is part of Windows, not malware. Treat any tool that claims to “scan for 0x80070005” with extreme suspicion.
Will running System File Checker fix 0x80070005? Sometimes. SFC repairs corrupted system files, which is one of the underlying causes — but only one. If your scenario is Office activation or OneDrive sync, SFC will run cleanly and the error will still be there because the fault isn’t in the file integrity layer. SFC is worth running as part of the Windows Update scenario fix path; it’s largely irrelevant for the others.
Why does the same error code mean different things?
Because Windows error codes describe the result of an operation, not the cause. 0x80070005 means “the call returned Access Denied.” It doesn’t say which call, what was being accessed, or by whom. Identifying the actual cause is what the scenario articles do.
Does 0x80070005 mean my account is broken? Usually no — most cases are service-state, file ACL, or token cache issues that don’t affect the underlying account. The exception is the Office activation surface, where token corruption can require signing the account out fully and back in. The fix in that case isn’t to delete or rebuild the account; it’s to clear the local cache.
How do I know which scenario applies to me? By where the error appeared on screen. If you saw it in Settings → Windows Update, you’re on the Windows Update scenario. If you saw it in Word or Excel after sign-in, you’re on the Office activation scenario. If OneDrive surfaced it, you’re on the OneDrive scenario. If a third-party installer produced it, the cause is almost always antivirus or elevation. Pick the matching scenario article from the links above.
Can I just reinstall Windows to fix this?
You can, and it will resolve the error in nearly all cases. But it’s a heavy hammer for what’s usually a localised problem. Try the scenario-specific fixes first; reserve reinstall for cases where the error is reproducing across multiple unrelated surfaces (which is the signal that the problem is broader than 0x80070005).