Fix OneDrive Error 0x8004de40 - Connection Failed
You are staring at a crossed-out cloud icon in your taskbar, and OneDrive refuses to sign you in no matter how many times you click. Your computer has lost its secure connection to Microsoft servers, usually due to a minor network glitch or a drift in your system time.
Why this happens
This error occurs when your PC loses its synchronization with the time server or when the local network stack becomes corrupted. Because OneDrive requires a perfectly matched time stamp for secure communication, even a two-minute discrepancy will cause the connection to fail.
What you'll need
You will need administrative access to your Windows user account to run network reset commands.
Steps
-
01Press the Windows key, type
cmd, right-click it, and select Run as administrator to open a command prompt. -
02Type
netsh winsock resetand press Enter to reset your network socket catalog. -
03Type
netsh int ip resetand press Enter to reset the TCP/IP stack. -
04Type
ipconfig /flushdnsand press Enter to clear your local DNS cache. -
05Right-click your system clock in the bottom right corner of the screen, select Adjust date and time, and click Sync now.
-
06Restart your computer to apply the network changes.
-
07If the icon remains crossed out, open OneDrive Settings, navigate to the Account tab, select Unlink this PC, and sign back in.
Still not working?
If you are still seeing the error, check your system for third-party firewall or VPN software that might be blocking the connection; try disabling these temporarily to see if sync resumes. If that fails, verify that your computer is not on a restricted network, such as a workplace or school network that blocks cloud storage synchronization.
Frequently asked questions
Will I lose my files if I unlink OneDrive?
No, unlinking your PC only removes the link between your local folder and the cloud. Your files remain safe in the cloud and on your local drive.
Why does my clock keep falling out of sync?
If your clock drifts constantly, the CMOS battery on your motherboard may be dying, or your Windows Time service might be disabled in services.msc.
Subscribe for fast, no-fluff fixes and best settings guides
For the games, phones, and apps you actually use - every common error, crash, and "how do I…" answered in under three minutes.