OneDrive for Business 0x8004de40 sign-in error troubleshooting for new employees: appears after password reset
🔍 WiseChecker

OneDrive for Business 0x8004de40 sign-in error troubleshooting for new employees: appears after password reset

New employees often see the 0x8004de40 sign-in error after resetting their password. This error blocks OneDrive from connecting to Microsoft 365. The root cause is stale cached credentials that Windows still holds from the previous password. This article explains why the error occurs and provides step-by-step fixes to clear the old credentials and restore OneDrive sync.

Key Takeaways: Sign-In Error 0x8004de40 After Password Reset

  • Windows Credential Manager > Windows Credentials > Generic credentials: Remove all entries containing “MicrosoftOffice16” and “OneDrive Cached Credential” to clear stale password data.
  • OneDrive Settings > Account > Unlink this PC: Breaks the current authentication state and forces a fresh sign-in prompt after password reset.
  • Run command: “control keymgr.dll” in Run dialog (Win+R): Opens Credential Manager directly for faster access when troubleshooting multiple new employees.

ADVERTISEMENT

Why the 0x8004de40 Error Appears After a Password Reset

When a new employee resets their password, Windows does not automatically update the cached credentials stored for OneDrive. The OneDrive client sends the old password hash when trying to authenticate with Microsoft 365 servers. The server rejects the request and returns error code 0x8004de40, which means “access denied due to invalid credentials.”

The error appears in the OneDrive systray icon as a red circle with a white cross. Clicking the icon shows a sign-in prompt that fails immediately. The problem is not with the network or the OneDrive client itself. It is purely a credential mismatch between what Windows stored and what Microsoft 365 now expects.

Where Stale Credentials Are Stored

Windows stores OneDrive authentication data in two locations. The primary location is Credential Manager under Windows Credentials. The secondary location is the OneDrive account cache inside the user profile. Both must be cleared to fully resolve the error.

Steps to Clear Stale Credentials and Fix Error 0x8004de40

Follow these steps in order. Do not skip any step. If the error persists after step 3, proceed to step 4.

  1. Close all Microsoft 365 applications
    Close Outlook, Teams, Word, Excel, and any other Office apps. Right-click the OneDrive cloud icon in the system tray and select Pause syncing for 2 hours. This prevents conflicts while you modify credentials.
  2. Open Credential Manager
    Press Win+R, type control keymgr.dll, and press Enter. This opens Credential Manager directly. Click Windows Credentials in the top section.
  3. Remove Microsoft Office and OneDrive credentials
    Scroll to the Generic credentials section. Look for entries that start with MicrosoftOffice16 and OneDrive Cached Credential. Click the arrow to expand each entry, then click Remove. Confirm the removal. Remove all entries that contain your work email address.
  4. Unlink OneDrive from this PC
    Right-click the OneDrive cloud icon in the system tray. Select Settings. Go to the Account tab and click Unlink this PC. Click Unlink account in the confirmation dialog.
  5. Restart the computer
    Restart Windows to clear any remaining cached session data from memory. Do not skip this step. A restart ensures all credential caches are flushed.
  6. Sign in to OneDrive with the new password
    After the restart, open OneDrive from the Start menu. Enter your work email address. On the sign-in page, type your new password. If prompted for multi-factor authentication, complete the verification. OneDrive will re-create the credential entries with the correct password hash.

If OneDrive Still Shows Error 0x8004de40

If the error returns after signing in, the credential cache inside the user profile may still hold the old token. Use the following additional step.

  1. Delete the OneDrive token cache folder
    Press Win+R, type %localappdata%\Microsoft\OneDrive\settings, and press Enter. Delete all files and folders inside the settings folder. Do not delete the folder itself. Restart OneDrive from the Start menu.

ADVERTISEMENT

If OneDrive Still Has Issues After the Main Fix

Some new employees may encounter related errors even after clearing credentials. These issues share the same root cause of stale authentication data.

“We can’t sign you in with this credential” prompt appears repeatedly

This prompt means the OneDrive client still has a cached token from the old password. Repeat steps 2 and 3 from the main fix. Also check for saved passwords in your browser. Open your browser settings, go to Passwords, and remove any saved password for login.microsoftonline.com. Then sign in again.

OneDrive sync stops after password change on another device

If you changed your password on a phone or web browser, OneDrive on the PC may not receive the update. The 0x8004de40 error appears on the PC. Follow steps 2 through 6 from the main fix. The PC needs a fresh authentication token.

Error 0x8004de40 appears on a shared or domain-joined computer

On domain-joined computers, Group Policy may prevent Credential Manager changes. Contact your IT administrator. They can clear the credentials remotely using PowerShell or reset the user profile. As a temporary workaround, use OneDrive for the web at onedrive.com until IT resolves the cache.

Credential Manager Removal vs OneDrive Unlink: Key Differences

Item Credential Manager Removal OneDrive Unlink
Description Deletes stored password and token data in Windows Breaks the connection between OneDrive and your Microsoft 365 account
Effect on local files None Files remain on disk but stop syncing until you sign in again
Effect on other Office apps May cause Outlook or Teams to prompt for password Only affects OneDrive
Time to complete 2-3 minutes 1 minute
When to use First step for 0x8004de40 after password reset Use after clearing credentials to force fresh authentication

Error 0x8004de40 after a password reset is a credential cache issue, not a network or client problem. By removing the old credentials from Credential Manager and unlinking OneDrive, you force the client to request a new token with the correct password. New employees should also clear the OneDrive settings folder if the error persists. For future password changes, remember to sign out of OneDrive on all devices before changing the password to avoid this error entirely.

ADVERTISEMENT