Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Fix OneDrive Error 0x8004de40 on Windows

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

OneDrive error 0x8004de40 usually means the app can’t connect to Microsoft’s servers, often due to a corrupted cache, a stuck sync process, or an outdated credential. The fastest fix is to reset the OneDrive app (which clears its cache and re-links your account) and then sign back in. Below is the full step-by-step process, plus what to do if the error persists.

What You'll Need

  • Your Microsoft account password (you’ll need to sign in again after resetting OneDrive).
  • Administrator rights on your Windows PC (to run a few commands if needed).
  • A stable internet connection.

Step-by-Step

  1. Close OneDrive completely. Right-click the OneDrive cloud icon in the system tray (near the clock) and select Exit or Quit OneDrive. If you don’t see the icon, click the upward arrow to show hidden icons. If OneDrive is still running, open Task Manager (Ctrl+Shift+Esc), find “OneDrive” under Processes, right-click it, and choose End task.
  2. Reset OneDrive using the built-in reset command. Press Win + R to open the Run dialog. Type the following (note: the path may differ slightly on older Windows versions) and press Enter:
    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
    On Windows 8.1 or older, use: %localappdata%\Microsoft\OneDrive\OneDrive.exe /reset. A command prompt window may flash briefly. Wait a minute or two—OneDrive should restart automatically. If it doesn’t, launch OneDrive manually from the Start menu.
  3. If the error still appears, do a full uninstall and reinstall. Go to Settings > Apps > Apps & features (or Control Panel > Programs and Features). Find “Microsoft OneDrive” in the list, select it, and click Uninstall. Restart your PC, then download the latest OneDrive installer from the official Microsoft website (search “OneDrive download” and use the link from microsoft.com). Install it and sign in with your Microsoft account.
  4. Sign out and sign back in (if you prefer not to reset). Right-click the OneDrive tray icon, go to Settings (gear icon), then Account tab, and click Sign out. After signing out, close the window, then open OneDrive again and sign in with your credentials. This often refreshes the authentication token.
  5. Check your system date and time. Incorrect date/time can cause authentication failures. Right-click the clock in the taskbar, select Adjust date/time, and ensure “Set time automatically” and “Set time zone automatically” are both toggled on. If they’re already on, toggle them off and on again, then restart OneDrive.
  6. Clear the OneDrive cache manually (if the reset didn’t work). Close OneDrive as in step 1. Press Win + R, type %localappdata%\Microsoft\OneDrive\ and press Enter. Delete the contents of the cache folder (if it exists) and the logs folder. Be careful not to delete your actual OneDrive files—these folders only contain temporary data. Then restart OneDrive.
  7. Run Windows Update. Sometimes a pending Windows update causes OneDrive to fail. Go to Settings > Update & Security > Windows Update and click Check for updates. Install any available updates and restart your PC.
  8. Check your firewall or proxy settings. OneDrive needs access to specific Microsoft URLs. If you use a third-party firewall or VPN, temporarily disable it to test. If OneDrive works with it off, add OneDrive to the allowed apps list in your firewall. For proxy settings, go to Settings > Network & Internet > Proxy and ensure “Use a proxy server” is off unless you need it for your network.

Common Mistakes

  • Not fully closing OneDrive before resetting. If the process is still running, the reset command may not work. Always end the task in Task Manager first.
  • Deleting your OneDrive folder. The reset command does not delete your files, but manually deleting the OneDrive folder in File Explorer will remove your local copies. Only delete the cache and logs folders as described.
  • Using a non-official installer. Always download OneDrive from Microsoft’s official site. Third-party sites may bundle malware or old versions.
  • Skipping the sign-in step. After a reset, you must sign in again. If you skip it, OneDrive won’t sync and the error may reappear.

Tips

  • After resetting, give OneDrive a few minutes to re-sync. Large libraries take time; don’t panic if files appear “cloud-only” at first.
  • If you use a work or school account, check with your IT admin—they may have policies that block OneDrive or require a specific sign-in flow.
  • Keep Windows and OneDrive updated. Microsoft frequently releases fixes for sync issues.
  • If you’re on a metered connection, OneDrive may pause syncing. Right-click the tray icon and select Pause syncing to check your settings, then resume.

Troubleshooting

If the error persists after trying the steps above:

  • Restart your PC. A simple reboot clears temporary glitches and releases file locks.
  • Check Microsoft’s service status. Visit the Microsoft 365 Service Status page (or the OneDrive status page) to see if there’s an ongoing outage. If there is, wait and try again later.
  • Create a new Windows user profile. A corrupted profile can cause OneDrive to fail. Create a temporary admin account and try OneDrive there. If it works, you may need to migrate your files.
  • Run the OneDrive diagnostic tool. Microsoft offers a built-in diagnostic for OneDrive (search “OneDrive diagnostic” in the Start menu). Run it and follow the prompts—it can fix common issues automatically.
  • Use the Microsoft Support and Recovery Assistant. Download this official tool from Microsoft’s website, select “OneDrive” and the error code, and let it walk you through a fix.
  • If nothing works, unlink and relink your account. Go to OneDrive settings > Account > “Unlink this PC.” This removes the connection but keeps your files. Then sign in again.

Frequently Asked Questions

Will resetting OneDrive delete my files?

No. The reset command only clears the app’s cache and settings. Your files stay on your PC and in the cloud. You just need to sign in again.

Why does error 0x8004de40 happen?

It’s usually a connectivity or authentication issue—your PC can’t reach Microsoft’s servers, or the login token has expired. A reset or sign-out/in usually resolves it.

Can I fix this without reinstalling OneDrive?

Yes. Try the reset command first, then sign out/in. Only if those fail should you uninstall and reinstall.

Does this error affect my files in the cloud?

No. Your cloud files are safe. The error only prevents syncing between your PC and the cloud.

I’m on a work computer—can I still reset OneDrive?

If your IT department manages OneDrive, they may have disabled the reset option. Contact your IT admin for assistance.

How long does the reset take?

The reset command itself takes about a minute. Re-syncing your files can take longer depending on how many files you have.