OneDrive Won't Sign In? Fix - Error 0x8004de40
Your OneDrive icon has a line through it, and clicking sign in either does nothing or hangs indefinitely. This error occurs because your computer has lost its secure handshake with Microsoft's servers, usually triggered by a stuck network configuration or a drift in your system time.
Why this happens
Error 0x8004de40 is a security-related rejection from Microsoft servers. If your system clock is off by even a few minutes or your network stack contains corrupted cache files, the server will silently drop your authentication attempts.
Steps
-
01Open the Start menu, type
cmd, right-click Command Prompt, and select Run as administrator. -
02Type
netsh winsock resetand press Enter to clear network socket errors. -
03Type
netsh int ip resetand press Enter to reset your TCP/IP stack configuration. -
04Type
ipconfig /flushdnsand press Enter to clear the local DNS resolver cache. -
05Right-click the clock in the bottom right corner of your taskbar, select Adjust date and time, and click the Sync now button.
-
06Restart your computer and wait ten seconds for OneDrive to launch automatically.
-
07Verify the cloud icon in your system tray is white with no lines or X markers, confirming your files are syncing.
-
08If the icon remains crossed out, click the OneDrive icon, select Settings, go to the Account tab, click Unlink this PC, and sign in again.
Still not working?
If you are still seeing the error after unlinking and re-linking, check your local firewall or third-party antivirus software, as these can occasionally block the OneDrive background process. If you are on a corporate network or VPN, disconnect the VPN to see if the issue is being caused by your office security policy.
Frequently asked questions
Will I lose my files if I unlink my PC from OneDrive?
No, unlinking simply stops the synchronization between your local folder and the cloud. Your files will remain safely stored on OneDrive.com, and they will re-sync once you sign back in.
Why does my clock being wrong cause this error?
OneDrive uses secure SSL/TLS connections that require an accurate time match to verify your credentials. If your local clock deviates from the server time, the security handshake is rejected to prevent potential tampering.
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.