Got the OneDrive error code 0x8004def5? Try these methods

by Vladimir Popescu
Vladimir Popescu
Vladimir Popescu
Managing Editor
Being an artist his entire life while also playing handball at a professional level, Vladimir has also developed a passion for all things computer-related. With an innate fascination... read more
Affiliate Disclosure
  • If you see the error code 0x8004def, it means that you won't be able to log into your OneDrive account normally.
  • When seeing the 0x8004def5 error, it is recommended that you temporarily disable your firewall settings, finish the setup for OneDrive, and also reinstall the software.
  • OneDrive is one of the best apps that allows you to back up, and share your files online, but the is always a possibility of encountering an error. 
  • Over time, our team has collected a large resource of data regarding both small and big issues with the Windows 10 OS. 
OneDrive error 0x8004def5

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

If you’re seeing the OneDrive error code 0x8004def5, you need to know that you’re not the only user going through this process.

Even though your first reaction could be to assume that it might be something wrong with the servers (because of how the error is displayed), but this is not the case for this issue.

error code - OneDrive error 0x8004def5

Here is what one OneDrive user had to say about this issue on the Microsoft Answers forum:

New installation of Win 10 1803. My corporate OneDrive account from Office365 is working perfectly, but my own OneDrive is not and hasn’t done so for days. So – fresh Windows 10 Pro 64-bit. No third-party AV. It’s not just one PC I have that’s having this issue, all recent builds are. Rock-steady 55Mb internet connection. What is going on?

Users have dealt with the situation by asking for help on different online forums. We researched and replicated the problem in order to give you a summary of the best methods that you can try to fix this problem once and for all.

1. Make sure that OneDrive is properly connected to your Windows 10 device

  1. Press the Win+X keys -> choose Settings from the menu.WinX menu settings - OneDrive error 0x8004def5
  2. Go to the Accounts section -> click Your email and accounts.
  3. Click the blue link named Sign in with Microsoft instead (If you see this option, it means that your OneDrive is not connected properly).
  4. Log into your Microsoft account by following the on-screen instructions.

2. Complete the OneDrive setup process

  1. Press the keys Win+E at the same time to open the Windows Explorer.
  2. Search for the OneDrive blue folder from the panel found on the left side of your window.OneDrive explorer - OneDrive error 0x8004def5
  3. Select which of the folders and files from your PC should sync with OneDrive.
  4. This will complete the setup of OneDrive and should solve the error message you encountered.
  5. If it doesn’t, please follow the next method mentioned in this guide.

3. Temporarily disable any firewall or antivirus program

Some users have had good results dealing with the error code 0x8004def5 by stopping their firewall and antivirus interference with the OneDrive app.

Disabling Windows Firewall:

  1. Press Win+R keys to open the Run dialog.
  2. Type ‘control’ -> press Enter.
  3. Inside the Control Panel window -> select System and Security (this option will be available only if you’re using the category view).System and security - OneDrive error 0x8004def5
  4. Select Windows Firewall.
  5. Choose the option Turn Windows Firewall on or off from the menu found on the left side of your screen.
  6. Click the bubble next to the option -> Turn off Windows Firewall (not recommended).
  7. Click OK to apply the settings.
  8. Now, you can try using OneDrive again, and note the changes.

Note: If OneDrive works properly after doing this, please add the app to the whitelist of your firewall, and re-activate the protection.

Disabling antivirus protection:

Because we all use different types of antivirus software to protect ourselves from online threats, the steps to achieve this will vary.

You can find detailed information about this process by simply performing a google search with the antivirus name and adding ‘how to disable temporarily‘ or ‘how to whitelist an app‘.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Note: It is recommended that you temporarily disable the antivirus protection, and if you see good results, then consider whitelisting OneDrive.

4. Uninstall and re-install OneDrive

To uninstall OneDrive:

  1. Press the Win+X keys at the same time -> click the PowerShell(Admin) option from the pop-up menu.
  2. Inside PowerShell: taskkill /f /im OneDrive.exe -> press Enter to run the command.PowerShell - OneDrive error 0x8004def5
  3. Copy-paste and run the commands mentioned, making sure you use the right one for your system configuration:

64-bit version: %systemroot%SysWOW64OneDriveSetup.exe /uninstall
32-bit version: %systemroot%System32OneDriveSetup.exe /uninstall

To re-install OneDrive:

  1. Open PowerShell(Admin) again by using the above-mentioned steps.
  2. Type the command mentioned below by taking into account the system version:

64-bit version: %systemroot%SysWOW64OneDriveSetup.exe
32-bit version: %systemroot%System32OneDriveSetup.exe

Note: It is recommended that after the process is completed, you restart your PC. This will enable the files to be installed properly.

5. Use alternative cloud backup

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.

It is now up to you to choose your requirements and personal preferences. However, based on bandwidth availability, each provider will set a limit for the fairest amount of data that may be moved to the cloud on a daily basis.

These constraints will have an effect on backup strategies. Make sure to look through the list above and you’ll undoubtedly find one that suits your every day online and offline activities.

We hope you managed to solve the 0x8004def5 error message from OneDrive, and that you are able to use the software fully. You can visit our Windows 10 errors hub for more answers and assistance.

If you found any of these methods useful in your situation, please don’t forget to let us know by using the comment section found below this article.

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: