How to Fix the Account Switch Detected Error in OneDrive for Business
Question details
Users are unable to sign in or sync files due to an 'Account Switch Detected' error prompt in the OneDrive client.

- Product
- OneDrive for Business
- Device & OS
- Windows (with mentions of Mac and iOS)
- Scenario
- Attempting to sign in, configure, or synchronize files using the OneDrive desktop or mobile application.
- Observed behavior
- The application blocks the sync process and displays an 'Account Switch Detected' message, remaining unresolved even after basic account unlinking.
Ensure you have administrative privileges to edit the Windows Registry and verify that your internet connection is stable before attempting these troubleshooting steps.
Reset and Unlink Your OneDrive Account
Clearing the local application cache and unlinking your account resolves most basic credential-related conflicts.
Click the OneDrive cloud icon in your system tray, select the gear icon for Help & Settings, and click Settings. Go to the Account tab and click 'Unlink this PC'.
Press the Windows key + R to open the Run dialog. Type '%localappdata%\Microsoft\OneDrive\onedrive.exe /reset' and press Enter. The OneDrive icon will disappear and reappear after a minute or two.
Once the application restarts, enter your current OneDrive for Business credentials to set up your synchronization folder.

Remove Stale OneDrive Registry Configurations
If resetting the app fails, removing lingering OneDrive configuration data from the Windows Registry can eliminate deeper account conflicts.
Check Network, Proxy, and Security Settings
Strict firewalls, third-party antivirus software, or incorrect proxy server settings can interfere with OneDrive's authentication endpoints.
Experience Seamless Document Management with WPS Office
Tired of dealing with syncing errors and complex account configurations? WPS Office offers a lightweight, highly compatible alternative to Microsoft Office. With built-in cloud synchronization that's easy to manage, you can create, edit, and save documents effortlessly without the hassle.
- 1. Download the installer: Visit the official WPS Office website and click the download button for your operating system.
- 2. Install WPS Office: Run the downloaded executable file and follow the straightforward on-screen instructions to complete the setup.
- 3. Open and sync your files: Launch WPS Office, sign in to activate your free WPS Cloud storage, and easily open your existing Microsoft Office files.

Frequently Asked Questions
Will deleting the OneDrive registry key delete my synced files?
No. Deleting the OneDrive folder under the Registry Editor only removes configuration data and cached account settings. Your actual files stored locally and in the cloud remain completely safe and untouched.
Why do I get the 'Account Switch Detected' error on Mac and iOS devices?
On Apple devices, this error is usually caused by outdated or conflicting credentials saved in the macOS Keychain or iOS system cache. Resolving it typically requires signing out of all Microsoft apps, clearing Microsoft-related entries in Keychain Access, and reinstalling the app.
Can changing my sign-in ID or email address trigger this error?
Yes. If your organization's IT administrator recently changed your User Principal Name (UPN) or primary email address, the local OneDrive sync app may detect a mismatch between the new ID and the old cached credentials, triggering the switch detected alert.
What should I do if resetting and registry fixes don't work?
If local troubleshooting fails, try completely uninstalling and reinstalling the OneDrive sync app. You should also try logging into OneDrive for Business via a web browser to verify whether the issue is with your local device or a server-side account lock.




