Remote workers who recently reset their Microsoft 365 password may see the OneDrive sign-in error 0x8004de40. This error prevents OneDrive from syncing files and typically appears right after the password change. The cause is a cached credential mismatch between the new password and the authentication token stored by OneDrive. This article explains why the error occurs and provides four tested fixes that remote workers can apply without IT admin privileges.
Key Takeaways: Fixing OneDrive Error 0x8004de40 After Password Reset
- Windows Credential Manager > Windows Credentials > OneDrive Cached Credentials: Remove old OneDrive entries to force a fresh authentication handshake with the new password.
- OneDrive Settings > Account > Unlink this PC: Unlinking and relinking OneDrive clears the stale token and reconnects using the updated Microsoft 365 credentials.
- Run “onedrive.exe /reset” in Command Prompt: This command resets the OneDrive sync engine without deleting local files, resolving token mismatch issues.
Why the 0x8004de40 Error Appears After a Password Reset
OneDrive for Business uses a cached authentication token to maintain a persistent connection to Microsoft 365. When you reset your password in the Microsoft 365 admin portal or through self-service password reset, the old token becomes invalid. OneDrive does not automatically detect the password change. It continues to present the stale token to Azure Active Directory, which rejects it and returns error 0x8004de40.
For remote workers connected through a VPN or a corporate network that uses conditional access policies, the error can be more persistent. The VPN session may hold an expired token as well, compounding the authentication failure. Windows Credential Manager stores the cached credentials separately from the OneDrive app cache. Both locations must be cleared to fully resolve the error.
The Role of Windows Credential Manager
Windows Credential Manager stores saved logins for network resources, including Microsoft 365 services. When you sign in to OneDrive, Windows saves a credential entry under the name MicrosoftOffice16_Data:ADAL:<your-tenant-id>. This entry contains the old token. After a password reset, this stored credential is no longer valid. OneDrive tries to use it, fails, and shows error 0x8004de40.
Why the Error Affects Remote Workers More
Remote workers often rely on persistent VPN connections or network proxies that cache authentication responses. If the VPN tunnel is not refreshed after the password reset, the proxy may still supply the old token to OneDrive. Additionally, remote workers may not have immediate access to IT support, making self-service troubleshooting essential.
Steps to Clear Cached Credentials and Fix the Sign-In Error
The following four methods resolve the 0x8004de40 error. Start with Method 1, as it directly addresses the root cause. If the error persists, proceed through the methods in order.
Method 1: Remove OneDrive Credentials from Windows Credential Manager
- Open Credential Manager
Press the Windows key and type Credential Manager. Click the result to open the control panel app. - Switch to Windows Credentials
Click the Windows Credentials tab. You will see a list of saved credentials under Generic Credentials. - Locate OneDrive-related entries
Look for entries that contain MicrosoftOffice16_Data:ADAL: followed by a GUID. These entries store the cached token for OneDrive and other Office apps. You may see multiple entries with similar names. - Remove each OneDrive credential
Click the arrow to expand each entry, then click Remove. Confirm the deletion when prompted. Repeat for all entries that match the pattern. - Restart OneDrive
Right-click the OneDrive cloud icon in the system tray and select Close OneDrive. Open OneDrive from the Start menu. You will be prompted to sign in again with your new password.
Method 2: Unlink and Relink OneDrive
- Open OneDrive Settings
Right-click the OneDrive cloud icon in the system tray and select Settings. - Go to the Account tab
In the Settings window, click the Account tab. - Click Unlink this PC
Under the account section, click Unlink this PC. Confirm the action when the warning dialog appears. - Set up OneDrive again
Once unlinked, the OneDrive setup window opens automatically. Enter your Microsoft 365 email address and click Sign in. Enter your new password and complete the setup. Choose the folders you want to sync.
Method 3: Reset OneDrive Sync Engine
- Close OneDrive completely
Right-click the OneDrive cloud icon and select Close OneDrive. Ensure no OneDrive processes are running in the background. - Open Command Prompt
Press the Windows key, type cmd, right-click Command Prompt, and select Run as administrator. - Run the reset command
Type the following command and press Enter:%localappdata%\Microsoft\OneDrive\onedrive.exe /reset - Wait for the reset to complete
A command window will flash briefly. This process clears the sync database and cached tokens. After a few seconds, OneDrive should restart automatically. If it does not, launch OneDrive from the Start menu. - Sign in with your new password
OneDrive will ask you to sign in again. Enter your new password and complete the setup.
Method 4: Repair Microsoft 365 Apps
- Open Windows Settings
Press Windows key + I to open Settings. - Go to Apps
Click Apps then Installed apps or Apps & features. - Find Microsoft 365
Scroll to Microsoft 365 Apps for enterprise or Microsoft 365. Click the three dots next to it and select Modify. - Run Quick Repair
In the Microsoft 365 repair window, select Quick Repair and click Repair. Follow the on-screen instructions. This fixes missing or corrupted Office components that may affect OneDrive authentication. - Restart and test OneDrive
After the repair completes, restart your computer. Open OneDrive and sign in with your new password.
If OneDrive Still Shows the 0x8004de40 Error
If the error persists after trying all four methods, additional factors may be at play. The following issues are common among remote workers.
VPN or Proxy Caching an Old Token
Some VPN clients cache authentication tokens for the duration of the session. Disconnect from your VPN, then reconnect after clearing credentials. If you use a proxy server, check with your IT team to ensure the proxy is not caching expired tokens.
Conditional Access Policies Blocking the New Token
Your organization may have conditional access policies that require a specific device state or location. After a password reset, the policy may require a fresh device registration. Sign out of all Microsoft 365 apps, restart your computer, and sign in again. If the error persists, contact your IT support to verify your device meets policy requirements.
Corrupted OneDrive Installation
A corrupted OneDrive installation can prevent successful authentication even after clearing credentials. Uninstall OneDrive from Windows Settings under Apps. Download the latest OneDrive installer from the Microsoft website and reinstall. After reinstallation, sign in with your new password.
Manual Credential Removal vs OneDrive Reset: Key Differences
| Item | Manual Credential Removal | OneDrive Reset |
|---|---|---|
| Target | Windows Credential Manager entries | OneDrive sync engine and local cache |
| Effect on local files | No effect | No effect |
| Time to complete | 2-3 minutes | 5-10 minutes |
| Requires admin rights | No | No |
| Resolves token mismatch | Yes | Yes, plus clears sync database |
| Best for | First attempt after password reset | When credential removal alone does not fix the error |
Remote workers can start with manual credential removal because it directly addresses the stale token. If the error returns after a few days, run the OneDrive reset command to clear deeper cached data.
After resolving the 0x8004de40 error, verify that OneDrive syncs files correctly. Open a test file in your synced folder and confirm the green check mark appears. To prevent this error after future password resets, use the Microsoft 365 sign-in prompt to update credentials in all Office apps before the old token expires. If you manage multiple remote workers, consider deploying a PowerShell script that clears OneDrive credentials from Windows Credential Manager after a password reset event.