How to Fix OneDrive Error 0x8004de40 (Sign-In Failure)
Diagnostic Procedures
- 1 Understand the root cause of OneDrive sign-in error 0x8004de40
- 2 Configure and enable TLS 1.0, 1.1, and 1.2 in Internet Options
- 3 Clear cached Microsoft credentials in Windows Credential Manager
- 4 Reset the OneDrive desktop client using system execution commands
- 5 Flush DNS and reset Winsock protocols to clear network routing glitches
How to Fix OneDrive Error 0x8004de40 (Sign-In Failure)
If you are seeing OneDrive Error Code 0x8004de40, it means OneDrive is having difficulty connecting to the cloud. This error is officially classified as a sign-in or connection failure and is most common on Windows 10 and Windows 11.
Fortunately, you can fix it by following these five proven troubleshooting methods.
What Causes OneDrive Error 0x8004de40?
This error occurs when the OneDrive application attempts to connect to Microsoft’s cloud servers but is blocked. The primary culprits are:
- Network Connectivity Glitches: Intermittent internet or strict firewall settings.
- Disabled TLS Protocols: OneDrive requires secure TLS 1.2 or TLS 1.3 protocol channels to connect, which may be disabled in your Windows internet configuration.
- Corrupted Credentials: Outdated or corrupted credentials cached by Windows.
- App Sync Glitch: A local cache problem in the OneDrive client.
Detailed Steps to Resolve Error 0x8004de40
Method 1: Enable TLS 1.0, 1.1, and 1.2 (Highly Recommended)
OneDrive relies on Windows Internet Options to establish secure TLS tunnels. If these are disabled, the connection fails.
- Press
Windows Key + Rto open the Run dialog box. - Type
inetcpl.cpland press Enter to open Internet Options. - Navigate to the Advanced tab.
- Scroll down to the Security section.
- Ensure the following checkboxes are ticked:
- Use TLS 1.0
- Use TLS 1.1
- Use TLS 1.2
- Click Apply and then OK.
- Restart your computer and try logging into OneDrive.
Method 2: Clear Cached Credentials in Windows
If Windows has stored an expired or corrupted session token, clearing it forces OneDrive to fetch a fresh security ticket.
- Click the Start menu, search for Credential Manager, and select it.
- Click on Windows Credentials.
- Scroll down to find any entries that start with
MicrosoftOffice16_Data:live:cidorOneDrive. - Click on these entries and choose Remove.
- Restart OneDrive and enter your login details.
Method 3: Reset the OneDrive Application
Resetting OneDrive resets all app settings, clears local databases, and rebuilds the sync state without deleting your actual files.
- Press
Windows Key + Rto open the Run window. - Copy and paste the following command, then press Enter:
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset - If Windows displays a “cannot find” error, try this command instead:
C:\Program Files\Microsoft OneDrive\onedrive.exe /reset - Wait 2 minutes, then click the Start menu, search for OneDrive, and launch it manually.
Method 4: Reset Winsock and Flush DNS
Network routing caches can prevent your computer from resolving Microsoft’s authentication addresses.
- Right-click the Start menu and select Terminal (Admin) or Command Prompt (Admin).
- Type the following command to reset Winsock and press Enter:
netsh winsock reset catalog - Next, flush your DNS resolver cache by running:
ipconfig /flushdns - Reboot your PC and sign in.
Summary Checklist for Quick Reference
- Verify your date and time settings are synced to internet time.
- Ensure you are not running a third-party VPN or proxy that blocks Microsoft servers.
- Test your account on OneDrive Web to verify your credentials are functional.