OneDrive error code 0x8004e4a2 usually means the app can’t sign in to your account, often due to a corrupted cached credential, a system time mismatch, or a broken Office/OneDrive integration. The fixes below resolve the issue in most cases, starting with clearing cached credentials and checking your clock.
What This Error Actually Means
Error 0x8004e4a2 is a sign-in failure code. When OneDrive tries to authenticate with Microsoft’s servers, it sends a token that your system has stored locally. If that token is stale, corrupted, or the server rejects it for any reason, OneDrive reports this error instead of opening your files. It is not a file corruption error, so your data is safe. The problem is purely in the authentication handshake between your PC and Microsoft’s cloud.
This error appears most often after a Windows update, after you change your Microsoft account password, or when you have multiple Office and OneDrive versions installed side by side. It can also happen if your system’s date and time are wrong, because the security token has a timestamp that must fall within a valid window.
Why Cached Credentials Cause This
Windows stores your Microsoft account credentials in a vault called Credential Manager. OneDrive uses these saved tokens to keep you signed in across restarts. When the token becomes outdated—for example, after a password change on another device—OneDrive keeps trying the old token and gets rejected with 0x8004e4a2.
The fix is to remove the old credentials and let OneDrive create fresh ones. This is safe: you will simply need to sign in again once. You will not lose any files, and your local OneDrive folder stays intact.
Fix 1: Clear Cached Credentials (Most Common)
- Press Windows + R, type credential manager, and press Enter.
- Click Windows Credentials.
- Scroll to the section labeled Generic Credentials.
- Look for entries that start with OneDrive Cached Credential or contain MicrosoftOffice16 or OneDrive.
- Click each one and choose Remove.
- Restart OneDrive from the system tray (right-click the cloud icon, then Exit, and relaunch from Start).
When OneDrive restarts, it will ask you to sign in again. Enter your normal Microsoft account credentials. This clears the stale token and usually solves the error immediately.
Fix 2: Reset OneDrive Completely
If clearing credentials doesn’t work, a full reset of OneDrive often does. This re-registers the app with Windows without deleting your files.
- Press Windows + R, type onedrive.exe /reset, and press Enter.
- A command prompt window flashes briefly, then OneDrive restarts automatically.
- If it doesn’t restart, type onedrive.exe in the Run box and press Enter.
- You will be asked to sign in again. Do so and check if the error is gone.
This reset is safe. It does not delete your local files or your cloud data. It only clears the app’s internal state and reconnects it to Windows.
Fix 3: Check System Date and Time
Authentication tokens are time-sensitive. If your PC clock is more than a few minutes off, Microsoft’s servers reject the token with an error like 0x8004e4a2.
- Right-click the clock in the taskbar and select Adjust date/time.
- Toggle Set time automatically to On, and Set time zone automatically to On.
- If they are already on, turn them off, wait 10 seconds, then turn them back on.
- Restart OneDrive and test.
A simple time sync fixes this error in a surprising number of cases, especially after a motherboard battery replacement or a dual-boot setup where another OS changed the clock.
Fix 4: Repair Office and OneDrive Integration
OneDrive is tightly integrated with Microsoft Office. A broken Office installation can cause sign-in failures that appear as OneDrive errors. Repairing Office often clears the conflict.
- Open Settings > Apps > Installed apps (or Apps & features on older Windows).
- Find Microsoft 365 or Microsoft Office in the list.
- Click the three-dot menu and choose Modify (or Change).
- Select Quick Repair first. If that doesn’t help, choose Online Repair (requires internet and takes longer).
- Restart your PC after the repair completes.
This fixes cases where the error appears when you try to open or save Office files from OneDrive, but OneDrive itself seems to work in the background.
Fix 5: Unlink and Relink Your Account
If none of the above works, unlinking your account from OneDrive and linking it again is the most thorough non-destructive option.
- Right-click the OneDrive cloud icon in the system tray.
- Select Settings (or Preferences on Mac).
- Go to the Account tab and click Unlink this PC.
- Confirm, then sign in again with your Microsoft account.
- Choose your OneDrive folder location (keep the default) and let it sync.
This does not delete any files. It simply disconnects this PC from your cloud account and reconnects it fresh. All your local files will re-sync with the cloud, which may take a while if you have many files.
Frequently Asked Questions
Will I lose files if I reset OneDrive?
No. Resetting OneDrive (using onedrive.exe /reset) only clears the app’s internal configuration. Your local files stay in the OneDrive folder, and your cloud files remain on Microsoft’s servers. After reset, OneDrive re-syncs and downloads any missing metadata.
Does this error affect my other Microsoft apps?
Sometimes. If the root cause is a corrupted credential, Outlook, Teams, or Office may also show sign-in errors. The fixes above (clearing credentials, resetting OneDrive) often resolve those as well because they refresh the shared authentication token.
Why does this happen after I change my Microsoft password?
When you change your password, all devices that use the old password need to re-authenticate. OneDrive on a PC that hasn’t been used in a while still holds the old token, so it gets rejected. Clearing the cached credential forces a fresh sign-in with the new password.
Is error 0x8004e4a2 the same as 0x8004de40?
No. 0x8004de40 is a different error that usually points to a network or proxy issue. 0x8004e4a2 is specifically a sign-in/authentication failure. If you see 0x8004de40, check your firewall, VPN, or proxy settings instead.
Can I fix this without signing in again?
No. The error means OneDrive cannot verify who you are. You must re-authenticate at least once. The fixes above make that re-authentication work, but you cannot skip it.
What if none of these fixes work?
If you’ve tried all five fixes and still see the error, run the Microsoft Support and Recovery Assistant for OneDrive. It’s a free Microsoft tool that diagnoses and fixes common OneDrive issues automatically. If that fails, check if your Microsoft account itself is locked or has a pending security alert.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Fix Outlook Inbox Corruption with DISM in Windows
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac