When a user resets their Microsoft 365 password, OneDrive for Business often shows error code 0x8004de40 during the next sign-in attempt. This error prevents the sync client from connecting to the cloud, leaving files unsynchronized and the user unable to access their OneDrive folders. The root cause is stale cached credentials that the OneDrive app continues to use after the password change. This guide explains why the error occurs and provides a reliable set of steps for help desk teams to clear the cached credentials and restore OneDrive sync without reinstalling the client.
Key Takeaways: Clearing 0x8004de40 After Password Reset
- Windows Credential Manager > Windows Credentials: Removing all entries containing “OneDrive Cached Credential” forces the app to request fresh tokens.
- OneDrive Settings > Account > Unlink this PC: Disconnects the local sync relationship before reauthentication.
- Run command:
onedrive.exe /reset: Resets the sync client without deleting local files or breaking existing sync relationships.
Why Error 0x8004de40 Appears After a Password Reset
The OneDrive sync client stores authentication tokens in the Windows Credential Manager under the category Windows Credentials. These tokens are bound to the user’s previous password. When an administrator or the user changes the Microsoft 365 password, the stored token becomes invalid. On the next sign-in attempt, OneDrive tries to use the cached token, fails validation, and returns error 0x8004de40.
The error message typically reads: “Something went wrong and we can’t sign you in. Please try again later. (Error code: 0x8004de40)”. The client does not automatically prompt for new credentials because it still holds a token that it considers valid until the authentication server rejects it. Help desk teams often see this issue when bulk password resets are performed or when a user’s account is re-enabled after a security incident.
The fix requires clearing the stale token from the credential store and then forcing OneDrive to reauthenticate. A simple restart of the app or a repair installation will not resolve the problem because the cached credential remains in place.
Steps to Fix the 0x8004de40 Sign-In Error After a Password Reset
Follow these steps in order. Each step builds on the previous one. Do not skip the credential removal step even if you plan to unlink the account first.
- Close OneDrive completely
Right-click the OneDrive cloud icon in the system tray near the clock. Select Pause syncing and then choose Quit OneDrive. Verify that no OneDrive process remains by pressing Ctrl+Shift+Escape to open Task Manager and confirm no OneDrive.exe entry exists under Processes. - Remove cached credentials from Credential Manager
Open the Windows Control Panel. Select User Accounts then Credential Manager. Click Windows Credentials. Scroll down to the Generic Credentials section. Look for any entry that contains the text OneDrive Cached Credential or MicrosoftOffice16_Data:ADAL: followed by your tenant name. Click the arrow to expand each matching entry, then click Remove. Confirm the removal. Remove all such entries — there may be more than one. - Unlink the PC from OneDrive settings
Press the Windows key and type OneDrive. Open the OneDrive desktop app. If the sign-in window appears, close it. In the OneDrive settings window, go to the Account tab. Click Unlink this PC. Confirm the action when prompted. This step clears the local sync relationship but does not delete your files. - Reset the OneDrive sync client
Press Windows key + R to open the Run dialog. Type the following command and press Enter:onedrive.exe /reset
A command prompt window will flash briefly. Wait 30 seconds. The OneDrive setup window may appear automatically. If it does not, press Windows key + R again and run:onedrive.exe - Sign in with the new password
When the OneDrive sign-in window appears, enter the user’s full Microsoft 365 email address. On the password page, type the new password. Complete any additional authentication prompts such as multi-factor authentication. OneDrive will re-establish the sync relationship and begin downloading the file listing. - Verify sync status
Right-click the OneDrive cloud icon in the system tray. Confirm the status shows Up to date or a sync progress bar. Open File Explorer and navigate to the OneDrive folder. Verify that files are present and that no red X or error icon appears on any file or folder.
Alternative method: Use the credential helper tool
If the manual credential removal does not resolve the error, use the Microsoft SaRA (Support and Recovery Assistant) tool. Download SaRA from the Microsoft 365 admin center. Run the tool and select OneDrive for Business > I need to fix OneDrive sync issues. SaRA will automatically clear cached credentials and reset the sync client. This method is useful for help desk teams managing multiple machines remotely.
If OneDrive Still Shows Error 0x8004de40 After the Main Fix
OneDrive shows the error again after a few minutes
This usually means that a secondary credential entry was missed. Reopen Credential Manager and check again for any remaining OneDrive Cached Credential entries. Also check entries under Windows Credentials that contain ADAL or MicrosoftOffice. Remove all of them and restart the process from step 1.
The user is prompted for credentials repeatedly after signing in
This indicates that the user’s Microsoft 365 account has Conditional Access policies requiring device compliance or multi-factor authentication. Open a web browser and navigate to https://portal.office.com. Sign in with the new password. Complete all authentication prompts. Then close the browser and retry the OneDrive sign-in. The web session will refresh the token cache.
Error persists on a domain-joined computer with roaming profiles
On domain-joined machines where user profiles roam, the cached credential may be stored in the user’s profile on the network. Log off the user, log on with a local administrator account, delete the user’s profile from System Properties > Advanced > User Profiles, then have the user log on again. This forces a fresh profile and a clean credential store.
Manual Credential Removal vs SaRA Tool: Key Differences
| Item | Manual Credential Removal | Microsoft SaRA Tool |
|---|---|---|
| Skill level required | Intermediate — user must navigate Credential Manager | Beginner — guided wizard with automated steps |
| Time to complete | 3–5 minutes per machine | 2–3 minutes per machine |
| Remote execution | Not supported — must be run locally | Supported via remote PowerShell with SaRA cmdlets |
| Scope of cleanup | Only removes OneDrive and ADAL entries | Removes all Microsoft 365 cached credentials, resets sync, and repairs Office activation |
| Risk of data loss | None — files remain on disk | None — files remain on disk |
For help desk teams handling multiple password-reset incidents, the SaRA tool is the faster option. For individual users or machines with strict software restrictions, the manual method works reliably without requiring additional downloads.
After completing the fix, you can now successfully sign in to OneDrive using the new password without seeing error 0x8004de40. Next, verify that Known Folder Move is still active by checking OneDrive settings under Sync and backup > Manage backup. If the folders were moved before the password reset, they will reconnect automatically after the first sync. As an advanced tip, create a Group Policy Object that runs onedrive.exe /reset as a logon script for all users who recently had a password reset — this prevents the error from appearing on the first sign-in attempt.