Solved Error
How to Fix OneDrive Sign-In Error 0x8004de40
Quick Fix
Most people fix this in under a minute by resetting the OneDrive client:
1. Press Windows key + R to open Run.
2. Type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset and press Enter. The tray icon will disappear briefly.
3. Wait 1-2 minutes, then reopen OneDrive from the Start menu and sign in again.
If it still fails, temporarily disable any VPN, proxy, or third-party antivirus/firewall and try signing in again - these are the next most common causes.
What this error means
Error 0x8004de40 (sometimes paired with 0x8004de88) appears when signing in to OneDrive with the message 'There was a problem connecting to OneDrive. Check your Internet connection, and then try again.' Error Code 0x8004de40 or 0x8004de88 indicates OneDrive is having trouble connecting to the cloud. Despite the wording, it is rarely a real internet outage - it is usually caused by a proxy, VPN, antivirus/firewall interference, a stale local OneDrive cache, outdated TLS/cipher-suite settings, or (on work/school devices) a broken Microsoft Entra ID join.
Step-by-Step Guide
Fix 1: Confirm your connection and rule out VPN/proxy
- 1Check basic connectivity. Make sure other websites and apps work normally on the same network.
- 2Disable VPN and proxy. Check if you have any VPN or Proxy settings running on your device or router, and disable them if there is.
- 3Check Internet Properties. Press Windows + R, type
inetcpl.cpl, open the Connections tab, click LAN settings, enable Automatically detect settings and untick Use a proxy server for your LAN, then click OK and restart your PC. - 4Try a different network. Connect to a mobile hotspot temporarily to see if the sign-in succeeds, which confirms a local network/firewall block rather than an account problem.
Fix 2: Temporarily disable antivirus or firewall
- 1Turn off third-party antivirus. Turn off your anti-virus software or network firewall on your PC and try signing in again.
- 2Whitelist OneDrive in your firewall. Whitelisting Microsoft OneDrive in the firewall for both Private and Public networks should fix the OneDrive error code 0x8004de40 in Windows 11.
- 3Re-enable protection afterward once you confirm this was the cause, and add an OneDrive exclusion instead of leaving antivirus off permanently.
Fix 3: Reset the OneDrive app (Windows)
- 1Close OneDrive completely. Right-click the OneDrive tray icon and choose to quit, or use Task Manager.
- 2Run the reset command. Press Windows + R, paste
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset, and press Enter. The simple command would reset the OneDrive app on your computer. - 3Relaunch OneDrive manually if needed. Relaunch OneDrive manually if the icon does not reappear within a couple of minutes: run
%localappdata%\Microsoft\OneDrive\onedrive.exeand sign in again. - 4Reset OneDrive through Settings app. Alternatively, go to Settings > Apps > Microsoft OneDrive > Advanced options > Reset as a graphical equivalent of the command.
Fix 4: Fix outdated TLS/cipher suite settings (older Windows)
- 1Check TLS 1.2 support. This is especially relevant on Windows 8, Windows 7 Service Pack 1 (SP1), Windows Server 2012 or Windows Server 2008 R2 SP1 devices.
- 2Enable TLS protocols. Press Windows + R, type
inetcpl.cpl, go to the Advanced tab, scroll down, and tick Use TLS 1.2 (and TLS 1.1 if present). - 3Use Microsoft's Easy Fix Tool. The Easy Fix Tool can add TLS 1.1 and TLS 1.2 Secure Protocol registry keys automatically.
- 4Check cipher suite order settings. Check cipher suite order if the error continues, since even after you upgrade to TLS 1.2, it's important to make sure that the cipher suites settings match Azure Front Door requirements.
Fix 5: Reset Winsock and flush DNS
- 1Open Command Prompt as administrator. Search for
cmd, right-click it, and choose Run as administrator. - 2Reset Winsock. Type
netsh winsock reset catalogand press Enter, then restart your PC. If the above-discussed solutions do not fix the OneDrive Error Code 0x8004de40, try to reset the Windows Socket (Winsock), which manages the input and output requests of the internet on your Windows device. - 3Flush DNS. In the same admin Command Prompt, type
ipconfig /flushdnsand press Enter.
Fix 6: Rejoin Microsoft Entra ID (work/school devices only)
- 1Restart while connected to your organization's network. Restart the device while it is connected to your Microsoft Entra domain.
- 2Unjoin and rejoin if that fails. Open an elevated Command Prompt, then type
dsregcmd /leave, and press Enter. After the command runs, typedsregcmd /join, and press Enter. - 3Restart and sign in again after the join command completes. Only do this while connected to your company or school network, not remotely.
Fix 7: Clear cached credentials or reinstall
- 1Remove stale sign-in tokens. Open Credential Manager in Control Panel, select Windows Credentials, and remove any entries starting with OneDrive Cached Credentials or
msteams_adal, per user reports on Microsoft's own forums Please go to Credential Manager in the control panel, click on Windows Credentials, and under Generic Credentials find all the credentials starting withmsteams_adaland OneDrive Cached Credentials, then remove them. - 2Unlink and relink OneDrive. Right-click the OneDrive icon, open Settings, choose Unlink this PC, restart the device, and then sign in to OneDrive again.
- 3Reinstall OneDrive from Microsoft's website. Reinstall OneDrive if the problem persists using the latest standalone client from Microsoft's website.
Fix 8: Mac-specific reset
- 1This step is for macOS only. Quit OneDrive from the menu bar first.
- 2Run the built-in reset script. In Finder open Applications, Control-click OneDrive, choose Show Package Contents, open Contents > Resources, double-click ResetOneDriveApp.command, then open OneDrive again from Applications and sign in.
- 3Reinstall if the script is missing. If your OneDrive app is older and does not show the reset script, drag it to Trash and install the current OneDrive for Mac, then try the reset steps again.
When to get further help
Account-locked or storage-related codes. If you instead see 0x8004def7 or similar, this usually relates to storage limits or a frozen account rather than connectivity, and needs Microsoft account support. Business/Office 365 admin issues. If OneDrive works fine on other machines with the same account, but not this one, and none of the above fixes it, contact your organization's IT admin or open a Microsoft 365 support ticket, since some cases require an administrator-side fix. Persistent failures after all steps. If every method above fails, try a clean boot to rule out third-party software conflicts, or wait - some users report the error clearing on its own after a temporary Microsoft-side service issue.
Sources:
- Error Code 0x8004de40 or 0x8004de88 when signing in to OneDrive - SharePoint | Microsoft Learn
- Error Code 0x8004de40 when signing in to OneDrive - Microsoft Q&A
- OneDrive sign in error 0x8004de40 - Microsoft Q&A
- Microsoft shares workaround for OneDrive 0x8004de40 login issues
- OneDrive Error Code 0x8004de40: 6 Quick Solutions
- 8004de40 error code and have tried all troubleshooting - Microsoft Q&A
- 5 Fixes to OneDrive Error Code 0x8004de40 in Windows Efficiently
Heads up: this guide was drafted with AI assistance from the real sources listed below, and structured by our team for clarity. It may not cover every possible cause — if it doesn't fix your issue, let us know and we'll take a closer look. See how we create our fixes.
Was this fix helpful?
Related Error Fixes
- How to Fix QuickBooks Error 3371: Could Not Load the License DataQuickBooks Desktop
- How to Fix "Sorry, There Was an Error Licensing This Video" on YouTube TVYouTube TV
- How to Fix iTunes Error 0xE8000015 (iPhone Cannot Connect)iTunes
- How to Fix Outlook Error 'Something Went Wrong [1001]'Outlook
- How to Fix Disney+ Error Code 83Disney+