OneDrive error 0x8004de40, explained and fixed

Error 0x8004de40 appears when OneDrive starts and cannot complete sign-in, often with wording that there was a problem connecting to OneDrive. Microsoft documents two dominant causes: the account password changed and the stored credential no longer matches, and the PC's TLS 1.2 setting being off, which modern Microsoft sign-in endpoints require. Network filtering that blocks the sign-in endpoints produces the same code.

The fix, in order

  1. Sign out and back in. Right-click the OneDrive icon in the notification area, Settings, Account, Unlink this PC. Then sign in again with the current password. After a password change this alone clears the error.
  2. Confirm the account signs in on the web. Open onedrive.live.com (personal) or the work portal and sign in there. If the web sign-in fails, the problem is the account (password, lock, or a required password reset), not the app.
  3. Enable TLS 1.2. Open inetcpl.cpl from the Run box, Advanced tab, and ensure Use TLS 1.2 is ticked under Security; older images and some hardening scripts leave it off. Restart OneDrive afterwards.
  4. Clear cached credentials. Open Credential Manager, Windows Credentials, and remove entries for OneDrive and MicrosoftOffice/Office accounts, then sign in again. A stale cached credential is exactly what a post-password-change 0x8004de40 usually is.
  5. Reset OneDrive. Press Win+R and run %localappdata%\Microsoft\OneDrive\onedrive.exe /reset. The icon disappears for a minute or two and returns; files are not deleted, and sync state is rebuilt.
  6. Update or reinstall from Microsoft. If the app is an old standalone build, install the current OneDrive from Microsoft's download page over the top. Avoid third-party download sites for this; the sync client should only ever come from Microsoft.

If it still happens

On managed work machines, 0x8004de40 that survives all of the above is commonly a proxy or conditional-access block: the sign-in reaches Microsoft but the organization's policy rejects this device. That is an IT-department fix, and the web sign-in test in step 2 helps show it, since the web sign-in typically reports the policy refusal in plain words.

Common questions

Does resetting OneDrive delete my files? No. The /reset command rebuilds the app's local state and re-checks the library against the cloud. Files in the OneDrive folder and in the cloud are left in place.

Why did 0x8004de40 start right after I changed my password? Because the stored credential no longer matches the account. OneDrive keeps trying the old password, sign-in fails, and the failure surfaces as this connection-style code rather than a clear password message.

Related errors

Office error code 30015 · Teams error CAA70004 · Outlook shows Disconnected