Windows

3 Reliable Ways to Fix OneDrive Error Code 0x8004de40 in Windows 10

Learn what causes OneDrive connectivity error code 0x8004de40 in Windows 10 and how to fix it with three practical troubleshooting methods.

Chris Anderson
Chris Anderson
How-To Writer  •  Sep 19, 2026  •  5 min read

OneDrive error code 0x8004de40 usually means Windows cannot connect to Microsoft’s cloud services using the current network or security settings. If OneDrive refuses to sign in or keeps showing a connectivity error in Windows 10, the problem is often caused by proxy settings, firewall restrictions, or a network configuration issue.

The good news is that this error is usually fixable without reinstalling Windows or losing files. Start with the simplest checks first, then move on to deeper network and security fixes if needed.

3 Reliable Ways to Fix OneDrive Error Code 0x8004de40 in Windows 10

What OneDrive Error 0x8004de40 Usually Means

This error is most commonly tied to a connection problem between OneDrive and Microsoft’s servers. In many cases, OneDrive is not failing because of damaged files in your account. Instead, something on the PC or network is preventing a normal secure connection from being established.

Why It Matters If you know the error is connection-related, you can focus on network and security settings instead of wasting time on file sync folders or account cleanup.

1. Check Proxy Settings and Disable Anything Unnecessary

A bad proxy configuration is one of the most common causes of this error. OneDrive needs to reach Microsoft services directly, and a proxy server that is no longer valid can block that connection.

  1. Press Windows + I to open Settings.
  2. Go to Network & Internet.
  3. Select Proxy from the left side.
  4. Turn off Use a proxy server if it is enabled.
  5. Also disable any manual proxy setup you do not actively use.
  6. If you use a VPN, disconnect it temporarily and try OneDrive again.

If you are on a work or school network, a proxy may be required by your organization. In that case, you should confirm the proxy details with your IT administrator rather than disabling it permanently.

Quick Tip If OneDrive starts working after disabling the proxy, the proxy settings were likely the cause. You can then decide whether to leave them off or reconfigure them correctly.

2. Allow OneDrive Through Firewall or Security Software

Windows Defender Firewall or third-party antivirus tools can sometimes block OneDrive from making outbound connections. This often happens after a security update or if the software treats cloud sync traffic as suspicious.

  1. Open Windows Security from the Start menu.
  2. Select Firewall & network protection.
  3. Click Allow an app through firewall.
  4. Look for Microsoft OneDrive in the list.
  5. Make sure it is allowed on private networks, and public networks if needed.
  6. If you use third-party antivirus or internet security software, open its firewall or web protection settings and make sure OneDrive is not blocked.

If you recently installed new security software, temporarily pausing its web protection can help you confirm whether it is responsible. Only do this briefly for testing, and turn protection back on afterward.

Warning Do not leave your firewall or antivirus disabled for long periods. Use temporary testing only, then restore protection once you have identified the cause.
Key Fact OneDrive needs outbound access to Microsoft services even when local file syncing appears normal. A firewall rule can block sign-in and connectivity before it ever reaches the sync stage.

3. Reset the Network Stack and Refresh OneDrive's Connection

If proxy and firewall settings are not the problem, the issue may be with Windows networking components or a stale OneDrive session. Resetting the network stack can clear corrupted connection settings, and reinitializing OneDrive can force it to establish a fresh link to your account.

  1. Close OneDrive if it is running.
  2. Open Command Prompt as an administrator.
  3. Run the following commands one at a time: netsh winsock reset, then netsh int ip reset.
  4. Restart the computer after the commands finish.
  5. Open OneDrive again and sign in if prompted.
  6. If the error remains, open OneDrive settings, disconnect the account, and sign in again with the same Microsoft account.

If you still see the error after that, clear the saved OneDrive cache by resetting the app. In Windows 10, you can do this by running the OneDrive reset command from the Run dialog, which forces the app to rebuild its settings and connection data.

Note The OneDrive reset command does not normally delete cloud files. It mainly refreshes the local app configuration and sync state.

When to Try a Different Fix First

If the error began right after you changed a VPN, proxy, antivirus, or firewall setting, start there before doing anything else. If the problem happens only on one network, such as at work or on public Wi-Fi, the network itself is more likely to be blocking OneDrive than your PC.

Best For Users who see the error immediately after a security or network change, or who only have trouble on one specific internet connection.

What to Do If None of These Fixes Work

If OneDrive still shows error code 0x8004de40 after checking proxy settings, firewall access, and the network stack, the next step is to test whether the issue is tied to your user profile or the Windows installation itself. You can try a different user account on the same PC, or check whether the same Microsoft account works in OneDrive on another device.

If the account works elsewhere, the issue is local to the Windows 10 computer. At that point, reinstalling OneDrive or repairing Windows networking components may be necessary, but those steps are usually not needed for most cases.

Quick Tip If you can browse websites normally but OneDrive still fails, that points more strongly to a proxy, firewall, or security protocol problem than a general internet outage.
Topics

More from Windows

View all →
How to Fix DISM Error 0x800f0915 in Windows
Windows

How to Fix DISM Error 0x800f0915 in Windows

How to Fix Command Prompt When You Can’t Run It as Administrator
Windows

How to Fix Command Prompt When You Can’t Run It as Administrator

5 Ways to Fix HP Support Assistant When It Won’t Install
Windows

5 Ways to Fix HP Support Assistant When It Won’t Install

Why USB Devices Show Up as Unknown in Windows 11
Windows

Why USB Devices Show Up as Unknown in Windows 11

How to Fix the Windows Fast Startup Error 0xc00000d4
Windows

How to Fix the Windows Fast Startup Error 0xc00000d4

How to Fix a Volume Bar That Keeps Appearing in Windows
Windows

How to Fix a Volume Bar That Keeps Appearing in Windows