How to Fix OneDrive Error Code 0x8004de40 in Windows 11

When launching Microsoft OneDrive on Windows 11, users are frequently confronted with the message: ‘There was a problem connecting to OneDrive. Check your Internet connection and try again. (Error Code: 0x8004de40)’. Even with normal internet connectivity in browsers, OneDrive fails to authenticate with Microsoft 365 cloud servers. Error 0x8004de40 indicates an SSL/TLS secure channel negotiation failure between the desktop sync client and Azure Active Directory (Azure AD) or Microsoft Graph authentication endpoints.

What Triggers Error 0x8004de40 in OneDrive?

The failure occurs during secure communication protocol handshakes:

  • Disabled TLS 1.2 / TLS 1.3 Cipher Suites: Microsoft deprecated TLS 1.0 and 1.1 across all Microsoft 365 endpoints. If system cryptographic settings lack TLS 1.2 support, connection requests are rejected immediately.
  • Corrupted Local OneDrive Cache: Incomplete sync states or corrupted session cookies inside the OneDrive application directory.
  • Stale Windows Credential Manager Tokens: Expired Microsoft identity tokens preventing silent background authentication.
  • Winsock or Proxy Interceptors: Third-party VPN clients, anti-malware web filters, or stale proxy configurations intercepting HTTPS packets.

Step 1: Enable TLS 1.2 and TLS 1.3 in Internet Options

Verify that modern cryptographic protocols are enabled at the operating system level.

  1. Press Win + R, type inetcpl.cpl, and press Enter to open Internet Properties.
  2. Switch to the Advanced tab.
  3. Scroll down to the Security section near the bottom.
  4. Ensure Use TLS 1.2 and Use TLS 1.3 are both ticked. (Untick legacy SSL 3.0, TLS 1.0, and TLS 1.1 if enabled).
  5. Click Apply, then click OK.

Step 2: Reset Network Stack and Flush DNS

Clear socket errors and routing caches interfering with Azure authentication servers.

  1. Press Win + S, type cmd, and select Run as administrator.
  2. Execute the following commands sequentially, pressing Enter after each:
    netsh int ip reset
    netsh winsock reset
    ipconfig /release
    ipconfig /renew
    ipconfig /flushdns
  3. Restart your computer to finalise the network stack reset.

Step 3: Execute a Full OneDrive Client Reset

Resetting the OneDrive client forces a complete re-enumeration of synchronised folders without deleting your personal files.

  1. Press Win + R to open the Run dialogue.
  2. Type or paste the following command and press Enter:
    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
  3. The OneDrive cloud icon in the taskbar will disappear and reappear after one or two minutes.
  4. If the OneDrive icon does not reappear automatically after two minutes, press Win + R, paste the following command, and press Enter:
    %localappdata%\Microsoft\OneDrive\onedrive.exe
  5. Sign in with your Microsoft account credentials when prompted.

Step 4: Clear Stale Microsoft Credentials

Purging cached authentication tokens forces OneDrive to issue a clean login request.

  1. Press Win + S, type Credential Manager, and open it.
  2. Select Windows Credentials.
  3. Under Generic Credentials, locate all entries referencing OneDrive Cached Credentials or MicrosoftAccount:user=.
  4. Click the drop-down arrow next to each entry and click Remove.
  5. Reboot your computer and launch OneDrive to sign in afresh.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.