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.

KitsuneGuide Watch on YouTube ↗

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

  1. 01
    Open the Start menu, type cmd, right-click Command Prompt, and select Run as administrator.
  2. 02
    Type netsh winsock reset and press Enter to clear network socket errors.
  3. 03
    Type netsh int ip reset and press Enter to reset your TCP/IP stack configuration.
  4. 04
    Type ipconfig /flushdns and press Enter to clear the local DNS resolver cache.
  5. 05
    Right-click the clock in the bottom right corner of your taskbar, select Adjust date and time, and click the Sync now button.
  6. 06
    Restart your computer and wait ten seconds for OneDrive to launch automatically.
  7. 07
    Verify the cloud icon in your system tray is white with no lines or X markers, confirming your files are syncing.
  8. 08
    If 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.