Got the OneDrive error code 0x8004def5? Try these methods

Vladimir Popescu
by Vladimir Popescu
Windows & Software Expert
Loading Comments
Download PDF
Affiliate Disclosure

  • If you see the error code 0x8004def, it means that you won't be able to log into your OneDrive account.
  • When seeing the 0x8004def5 error, follow the troubleshooting steps written in the article below.
  • We have a special OneDrive fix dedicated section on our website filled with similar guides.
  • You can visit our Windows 10 Errors hub for help.
OneDrive error 0x8004def5

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‘.

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.


We hope you managed to solve the 0x8004def5 error message from OneDrive, and that you are able to use the software fully.

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.


FAQ: Learn more about OneDrive

  • What alternatives are there to OneDrive?

There are plenty of other cloud services that you can use if you don’t like or can’t use OneDrive.

  • Do I have to pay for OneDrive?

No, OneDrive comes with a free storage plan, but it is quite limited. There are other cloud storage services that also have free storage plans.

  • Why can’t I log into OneDrive?

If you’re seeing an OneDrive authentication error, simply follow the recommendations we have for you in this guide.