Quick answer: OneDrive error 0x8004de40 means the OneDrive sync app cannot reach the Microsoft cloud while signing in. The usual causes are a disabled TLS 1.2 client, a hardened cipher suite list without the ECDHE suites Azure Front Door accepts, or a proxy that breaks the connection. Fix the network path first, then TLS, then reset OneDrive.
OneDrive error 0x8004de40 is one of those tickets that looks like a user problem and almost never is. The user types the right password, OneDrive says Can’t sign in, and everything else on the machine seems fine: the browser opens Microsoft 365, Outlook connects, Teams works. When I hit this error, my first instinct used to be reinstalling OneDrive. That rarely helped. What fixed it most of the time was the connection itself: TLS settings, the cipher suite order or a proxy in the way. In this guide I go through the checks in the order I run them, with the PowerShell I use for each one.

What Does OneDrive Error 0x8004de40 Mean?
According to Microsoft Learn, error code 0x8004de40 (and its sibling 0x8004de88) indicates that OneDrive is having trouble connecting to the cloud. The user sees one of these messages:
- OneDrive Can’t sign in. Error 0x8004de40
- Login was either interrupted or unsuccessful. Please try logging in again. (Error Code: 0x8004de40)
- We can’t sign into your account, please try again later 0x8004de88

The key point is that the error is about the connection, not the account. A wrong password or an expired license produces different messages. So when you see the OneDrive can’t sign in error 0x8004de40, do not start by resetting the user’s password. Look at how this device talks to Microsoft 365 over HTTPS.
Why Does OneDrive Error 0x8004de40 Happen?
Microsoft 365 deprecated TLS 1.0 and 1.1 for commercial tenants starting October 15, 2020, as described in Preparing for TLS 1.2 in Office 365. The same page warns that after you move to TLS 1.2 you also need cipher suites that Azure Front Door supports, because Microsoft 365 and Azure Front Door differ slightly. That is where most of the cases I see come from. Here is how OneDrive error 0x8004de40 usually maps to a cause:
| Symptom or finding | Likely cause | Fix |
|---|---|---|
| Only OneDrive fails, browser sign-in works | Cipher suite order changed by a hardening GPO or tool | Enable and prioritize the ECDHE GCM suites, reboot |
| Error started after a security baseline was applied | TLS 1.2 client disabled in the Schannel registry | Remove the override or set Enabled to 1 |
| Works at home, fails in the office | Proxy or SSL inspection on the Microsoft 365 endpoints | Bypass inspection for Microsoft 365 traffic |
| Message shows 0x8004de88 instead | Same connectivity problem, documented in the same article | Same steps as 0x8004de40 |
| Everything checks out but sign-in still fails | Broken device join state or OneDrive settings | Check dsregcmd, then onedrive.exe /reset |
One detail is worth calling out. The Microsoft Learn page for this error (last updated July 2025) still lists two DHE cipher suites as supported by Azure Front Door. The current Azure Front Door TLS documentation says support for DHE cipher suites retired on April 1, 2026. So if a hardened client only offers DHE suites, it fails today even though it matched the older guidance. Make sure the ECDHE suites are there.
How Do I Fix OneDrive Error 0x8004de40 Step by Step?

Step 1: Rule out the network and proxy
First, confirm the device can reach the sign-in endpoint on port 443 and see which proxy WinHTTP is using. These two commands take ten seconds and save a lot of guessing:
Test-NetConnection login.microsoftonline.com -Port 443 | Select-Object ComputerName, TcpTestSucceeded
netsh winhttp show proxyCode language: JavaScript (javascript)If TcpTestSucceeded is False, you have a firewall, DNS or proxy problem, not a OneDrive problem. If there is a proxy that performs SSL inspection, Microsoft 365 traffic should bypass it. My practical tip: test the same laptop on a phone hotspot. If OneDrive signs in right away there, stop looking at the client and talk to the network team.
Step 2: Check that the TLS 1.2 client is not disabled
On Windows 10 and 11, TLS 1.2 is on by default, but baselines and old scripts sometimes turn it off, and then OneDrive error 0x8004de40 appears on the next sign-in. The Schannel overrides live under the keys documented in TLS registry settings. This shows whether anything overrides the TLS 1.2 client:
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -ErrorAction SilentlyContinue |
Select-Object Enabled, DisabledByDefaultCode language: JavaScript (javascript)No output means there is no override and the system default applies. If Enabled is 0 or DisabledByDefault is 1, find out which policy set it before you change it, otherwise it will come back. Microsoft’s article also asks you to check the TLS options on the Advanced tab of inetcpl.cpl. Make sure Use TLS 1.2 is ticked. The article says to tick TLS 1.0 and 1.1 as well, but since Microsoft 365 no longer accepts them, I only make sure 1.2 is on.
Step 3: Fix the cipher suite order with PowerShell
This is the step that fixed the majority of OneDrive error 0x8004de40 cases for me. List the current order and check for the two ECDHE GCM suites:
$need = 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256'
$have = (Get-TlsCipherSuite).Name
$need | ForEach-Object { [PSCustomObject]@{ Suite = $_; Enabled = $have -contains $_ } }Code language: PHP (php)If either one is missing, enable it at the top of the list with Enable-TlsCipherSuite. Position 0 is the highest priority:
Enable-TlsCipherSuite -Name 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' -Position 0
Enable-TlsCipherSuite -Name 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' -Position 0Code language: JavaScript (javascript)Run it from an elevated PowerShell window. Two things caught me out here. First, per Manage TLS, changes to the cipher suite order take effect on the next boot, so restart before you test. Second, if the order does not change after Enable-TlsCipherSuite, the SSL Cipher Suite Order policy (Computer Configuration > Administrative Templates > Network > SSL Configuration Settings) is probably set. In that case fix the GPO, or the Cryptography/TLSCipherSuites setting in Intune, instead of the client. Run gpresult /h report.html to see which GPO wins.
Step 4: Check the device join state
Microsoft’s guidance is to restart the device while it is connected to the organization’s network. If that does not help, it suggests leaving and rejoining Microsoft Entra ID with dsregcmd /leave and dsregcmd /join from an elevated prompt, while on the corporate network. I always look at the current state before I touch anything:
dsregcmd /status | Select-String 'AzureAdJoined|DomainJoined|AzureAdPrt 'Code language: JavaScript (javascript)Do not run the leave and join commands while travelling or off the corporate network, and be careful on Intune-managed or Autopilot devices, where leaving can affect management. On those, I would rather open a ticket with the device team than improvise.
Step 5: Reset OneDrive
If the connection is healthy and OneDrive error 0x8004de40 remains, reset the sync app. According to Reset OneDrive, a reset disconnects your sync connections but you do not lose files, and OneDrive then performs a full sync. Press Windows key + R and paste the first line as the signed-in user, not as admin. Use one of the other two paths if Windows says it cannot find the file:
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset
"C:\Program Files\Microsoft OneDrive\onedrive.exe" /reset
"C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe" /resetCode language: JavaScript (javascript)If OneDrive does not start again after a few minutes, launch it from the Start menu and sign in. If you had chosen to sync only some folders, you need to select them again.
How to Verify the OneDrive Error 0x8004de40 Is Gone
After the reboot, I run these checks before I close the ticket:
Get-TlsCipherSuite | Select-Object -First 4 -ExpandProperty Name
Test-NetConnection login.microsoftonline.com -Port 443 | Select-Object ComputerName, TcpTestSucceededCode language: JavaScript (javascript)
The ECDHE GCM suites should be near the top, the port test should return True, and OneDrive should sign in and show Up to date. If OneDrive error 0x8004de40 comes back after the next Group Policy refresh, a policy is still rewriting the cipher order or the TLS settings, so go back to the gpresult report.
How to Prevent OneDrive Error 0x8004de40
- Test hardening baselines and cipher suite policies against Microsoft 365 sign-in before rolling them out widely; in my experience they are the most common trigger for OneDrive error 0x8004de40.
- Keep the ECDHE GCM suites in any custom SSL Cipher Suite Order policy, and remember that DHE suites no longer work against Azure Front Door.
- Exclude Microsoft 365 traffic from SSL inspection on proxies and firewalls.
- Keep the OneDrive sync app updated; older builds can lack the reset command.
If you are chasing a OneDrive sign-in error November 2026 brought along with a new security baseline, check the cipher suite policy first, because that is the setting baselines change most often. The lesson OneDrive error 0x8004de40 taught me: when one Microsoft 365 app fails and the browser works, compare how each one connects before you blame the account.
Read more: Outlook Keeps Asking for Password? The Proven Microsoft 365 Fix
Read more: Install-Module Not Working? Fix NuGet and TLS 1.2 Errors Fast
Read more: SSPR Not Working in Entra ID? The Proven SSPR_0014 Fix
OneDrive Error 0x8004de40: FAQ
What causes OneDrive error 0x8004de40?
Microsoft documents it as OneDrive having trouble connecting to the cloud. In practice it is usually a disabled TLS 1.2 client, a cipher suite order without the ECDHE suites Azure Front Door supports, or a proxy or firewall in the path.
Is 0x8004de88 the same problem?
Yes. Microsoft covers 0x8004de40 and 0x8004de88 in the same article, and both mean OneDrive cannot connect to the cloud. Use the same troubleshooting steps.
Will resetting OneDrive delete my files?
No. According to Microsoft, a reset disconnects your sync connections but you do not lose files or data. OneDrive performs a full sync after it restarts.
Why did Enable-TlsCipherSuite not change the order?
The SSL Cipher Suite Order Group Policy setting overrides the default order. Check it with gpresult and update the policy. Also restart the device, because cipher suite order changes take effect on the next boot.
Do I need to enable TLS 1.0 and 1.1 to fix it?
No. Microsoft 365 deprecated TLS 1.0 and 1.1, so TLS 1.2 with supported cipher suites is what matters. Make sure the TLS 1.2 client is enabled and not overridden in the registry.
References
Microsoft Learn: Error Code 0x8004de40 or 0x8004de88 when signing in to OneDrive
Microsoft Learn: End-to-end TLS with Azure Front Door
Microsoft Learn: Preparing for TLS 1.2 in Office 365 and Office 365 GCC
Microsoft Learn: Enable-TlsCipherSuite
Microsoft Learn: Manage Transport Layer Security (TLS)
Microsoft Support: Reset OneDrive





