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.
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.
- Proxy settings that interfere with OneDrive
- Firewall or antivirus software blocking OneDrive traffic
- Incorrect network adapter or DNS settings
- A temporary issue with the current internet connection
- TLS or security protocol settings that prevent secure sign-in
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.
- Press Windows + I to open Settings.
- Go to Network & Internet.
- Select Proxy from the left side.
- Turn off Use a proxy server if it is enabled.
- Also disable any manual proxy setup you do not actively use.
- 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.
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.
- Open Windows Security from the Start menu.
- Select Firewall & network protection.
- Click Allow an app through firewall.
- Look for Microsoft OneDrive in the list.
- Make sure it is allowed on private networks, and public networks if needed.
- 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.
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.
- Close OneDrive if it is running.
- Open Command Prompt as an administrator.
- Run the following commands one at a time: netsh winsock reset, then netsh int ip reset.
- Restart the computer after the commands finish.
- Open OneDrive again and sign in if prompted.
- 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.
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.
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.