OneDrive Error Code 0x8004def5: Fix It With These 4 Methods

Check verified solutions get OneDrive running in minutes

Reading time icon 5 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • If you see the error code 0x8004def5, you won’t be able to log into your OneDrive account normally.
  • The problem arises due to improper installation, corrupt system files, or issues with the service itself.
  • Your primary approach should be to verify the ISP and router security settings, update the OS, or clear the OneDrive cache, amongst other solutions.
fix onedrive error code 0x8004def5 in Windows

OneDrive is a reliable cloud storage service and often the first choice of most Windows users. But, many have, of late, reported seeing the OneDrive error code 0x8004def5 in Windows.

The problem could affect any of the OneDrive accounts. There are reports where a business OneDrive account worked while a personal one didn’t, or even vice-versa. So, let’s find out all about the problem and how to get things up and running.

What is error code 0x8004def5 in OneDrive?

The error appears when users try to sign in or access OneDrive, and prevents the connection from establishing. And it mostly has to do with a problem at the user’s end. Here are the primary reasons you may come across the OneDrive error code 0x8004def5:

  • Poor Internet connectivity: Slow Internet speed is a common reason users encounter the error, so your primary approach should be to verify this.
  • Corrupt system files: When your installation of the OS has corrupt system files, errors with OneDrive and other native applications are bound to appear.
  • Misconfigured network settings: A security software or some privacy measure over the ISP or router settings could also lead to OneDrive error code 0x8004def5.
  • OneDrive service is down: Though a rare occurrence, it’s likely that the OneDrive service is down, and in this case, things are automatically resolved within a few hours.

How can I fix OneDrive error code 0x8004def5?

Before we move forward, here are a few quick tips, tricks, and checks to perform:

  • Restart the computer.
  • Ensure OneDrive is available and configured on your PC.
  • Check the Internet speed, and if it’s unsatisfactory, fix the slow Internet speed in Windows.
  • Verify that the OneDrive service is running through the dedicated Microsoft Service Health page, or you could use a reliable service like Downdetector.
  • Install any pending Windows updates.
  • Disable the antivirus, firewall, or VPN, if either is configured and running.
  • Check your ISP or router settings, and ensure that Parental Control is disabled and OneDrive (https://www.onedrive.live.com/) is added to the list of exceptions.
  • Make sure you are signed in with a Microsoft account on the PC and not a local account.

If none work, head to the fixes listed next.

1. Run the DISM and SFC scan

  1. Press Windows + R to open Run, type cmd, and hit Ctrl + Shift + Enter.cmd
  2. Click Yes in the UAC prompt.
  3. Paste the following three commands individually, and hit Enter after each:DISM /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-Image /ScanHealth DISM /Online /Cleanup-Image /RestoreHealth
  4. Once done, run the following command for the SFC scan:sfc /scannowsfc scan to fix onedrive error code 0x8004def5

If it’s the corrupt system files to blame for the OneDrive error code 0x8004def5, running the DISM tool and the SFC (System File Checker) scan should do the trick.

An even easier alternative for the above solution would be a specialized tool that can automatically repair corrupt files by locating healthy components as replacements.

2. Delete OneDrive cache

  1. Press Windows + E to open File Explorer, paste the following path in the address bar while replacing the Username with your current account name, and hit Enter:C:\Users\Username\AppData\Local\Microsoft\OneDrive\setup\logspath
  2. Locate the userTelemetryCache.otc and userTelemetryCache.otc.session files, select them and hit the Delete key.delete to fix onedrive error code 0x8004def5
  3. Choose the appropriate response if a confirmation prompt appears.

3. Whitelist OneDrive in Windows Firewall

  1. Press Windows + S to open Search, type Allow an app through Windows Firewall, and click on the relevant search result. allow an app to fix onedrive error code 0x8004def5
  2. Click on Change settings at the top.change settings
  3. Now, click on Allow another app.allow another app
  4. Click on Browse.browse
  5. Navigate the following path where Username is the current profile name in Windows:C:\Users\Username\AppData\Local\Microsoft\OneDrive
  6. Select the OneDrive.exe launcher, and click Open.add to fix onedrive error code 0x8004def5
  7. Click Add.add
  8. Now, make sure the Private and Public checkboxes next to OneDrive are ticked, and then click OK to save the changes.whitelist to fix Select the OneDrive.exe launcher, and click Open.

That’s it! If the firewall is blocking the program and triggering the OneDrive error code 0x8004def5, adding an exception for it will do the job.

4. Reinstall OneDrive

  1. Press Windows + I to open Settings, choose Apps from the navigation pane, and click on Installed apps on the right.installed apps
  2. Locate OneDrive, click on the ellipsis next to it, and click Uninstall.uninstall to fix onedrive error code 0x8004def5
  3. Again, choose Uninstall in the confirmation prompt.confirm
  4. Restart the computer for the changes to come into effect.
  5. Now, launch the Microsoft Store, search for OneDrive, and download the application.onedrive
  6. Once done, launch it, and follow the on-screen instructions to complete the configuration.

It could also be missing files or an improper initial installation to blame. In this case, reinstalling OneDrive should fix error code 0x8004def5.

Tip icon Tip
If nothing works, we recommend trying another cloud backup service for a flexible and error-free experience. The most well-known online backup service providers stake their names on keeping your data safe and secure during file transmission and online data storage.

After you have fixed the error, check some quick tips to boost Windows performance and make the OS faster than ever.

For any queries or to share a solution with us, comment below.

More about the topics: onedrive