0x8004def7 Error: How to Fix this OneDrive Sign in Issue

Try unlinking and relinking OneDrive if you get this error

Reading time icon 4 min. read


Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

  • When trying to sign into your account, you can encounter the can’t sign into OneDrive error message with code 0x8004def7.
  • The error occurs due to OneDrive storage capacity being exceeded and account suspension.
  • Try unlinking and relinking OneDrive on your PC and resetting the app.
0x8004def7

The error code 0x8004def7 is a recent error code many users complain about when launching the OneDrive app on their PCs. It appears with an error message Can’t sign into OneDrive. There is a problem with your account, and it occurs for several reasons. Hence, this article will discuss how to fix the issue.

Also, you can check our guide on fixing the OneDrive upload issues you can encounter when uploading files.

What causes error 0x8004def7?

Numerous factors may be responsible for the Error code 0x8004def7 when signing into OneDrive. Listed below are some notable ones:

  • Storage capacity exceeded – Since OneDrive is a cloud-based storage service, it has a storage capacity that determines the amount of data you can store. So, exceeding the space limit can affect the program’s work and cause errors when signing in or launching it.
  • Your account was suspended – Also, when you try to sign in to Microsoft OneDrive with a suspended account, it can be problematic and may be the cause for you receiving the error code 0x8004def7.
  • Network connection issues – Running the OneDrive app with an unstable network connection can cause problems with its connection during sign-in. Network-related issues like network congestion, and outdated router firmware can cause the network connection to be slow.
  • OneDrive sync app configuration issues – OneDrive allows users to sync their data across different devices to aid accessibility. However, you may have difficulty signing in to your account if the OneDrive sync app configuration issues impede the synchronization process.

Even though these factors can vary in different PCs, we’ll take you through basic steps for fixing the error and getting OneDrive to work.

How can I fix error 0x8004def7?

We recommend you perform the following preliminary checks before proceeding with any advanced troubleshooting:

  • Check your OneDrive storage – It will help to determine how much space you’ve used and have left. If you have exceeded or are near the storage limit, delete files or folders in OneDrive to free up space.
  • Check your network connection – You can power cycle your router or modem to refresh its network connection or switch to a more stable network.
  • Restart the OneDrive app – Close and relaunch OneDrive to see if it resolves background tasks affecting its process.
  • Try signing in via the web – If you can still access your account via the OneDrive native app, contact the support line for assistance.
  • Restart your computer – It is the fastest way to fix temporary issues impeding how the system works and interacts with programs.

You can go ahead with the solutions below if you can’t resolve the error:

  1. Click the OneDrive cloud icon in your notification area, and then select the OneDrive Help and Settings icon then Settings from the drop-down.
  2. Navigate to the Account tab, the Add an Account section, and click Unlink this PC.
  3. Click on the Unlink account option to confirm the unlinking process.
  4. Input your OneDrive email and click the sign-in button.
  5. Type in your password and select the sign-in button.
  6. Follow the on-screen instructions till you get to the last setup and select the Open my OneDrive folder option.

Re-linking your account will fix any login credentials or sync configuration issues causing the error and refresh the account setup.

2. Reset the OneDrive app

  1. Press Windows + R key to open the Run dialog box. Type the following and press Enter: %localappdata%\Microsoft\OneDrive\OneDrive.exe /reset
  2. The OneDrive icon will reappear when the process is complete.
  3. If the icon doesn’t reappear, open the Run dialog box, copy and paste the following strings and press Enter: %localappdata%\Microsoft\OneDrive\OneDrive.exe

Resetting the app will reset all OneDrive settings and corrupt cache data that can cause a OneDrive sign-in error. You can read about how to reset an app in Windows 11 if you have issues with the above steps.

Alternatively, you may be interested in our article about OneDrive error code 0x8004def7 and ways to fix it on your PC. Also, we have a comprehensive guide on OneDrive error code 0x8004deef and some fives for it.

If you have further questions or suggestions, kindly drop them in the comments section.

More about the topics: onedrive