When you leave an organization or switch to a different Microsoft 365 tenant, the old OneDrive for Business account often remains listed in the OneDrive sync app settings on your Windows computer. This stale account can cause sync conflicts, credential prompts, and confusion when opening shared files. The account may appear as disconnected or grayed out, but Windows still stores its cached credentials and registry entries. This article explains how to completely remove a stale OneDrive Business account from Windows 11 or Windows 10, including unlink steps, credential manager cleanup, and registry removal.
Key Takeaways: Removing a Stale OneDrive Business Account
- OneDrive settings > Account > Unlink this PC: Removes the account from the sync app but does not delete local files or clear cached credentials.
- Credential Manager > Windows Credentials > Generic Credentials: Delete all entries containing “MicrosoftOneDrive” or the stale tenant domain to stop password prompts.
- Registry Editor > HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1: Delete the registry key for the stale account to prevent it from reappearing after a reboot.
Why a Stale OneDrive Business Account Persists in Windows
OneDrive for Business uses a combination of the sync app, Windows Credential Manager, and the Windows registry to maintain active account sessions. When you unlink an account through the sync app, OneDrive removes the sync relationship but does not always delete the cached credentials or registry entries that Windows uses to identify the account. These remnants cause the stale account to reappear in the OneDrive settings pane after a restart or a Windows update.
The root cause is that the OneDrive sync app stores the account identifier in the registry under HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. Credential Manager holds OAuth tokens and cached passwords under generic credentials that start with MicrosoftOneDrive. Until both the registry key and the credentials are removed, Windows will continue to display the stale account as an available sync option.
Another factor is the presence of leftover files in the local OneDrive folder. If the folder still contains data from the old tenant, OneDrive may attempt to reconnect that folder to the old account during startup. Deleting or moving the local folder after unlinking prevents this reconnection attempt.
Steps to Remove a Stale OneDrive Business Account
Follow these steps in order. Do not skip any step. If you skip the registry cleanup, the account may return after a sign-out or reboot.
- Open OneDrive Settings and Unlink the Stale Account
Right-click the OneDrive cloud icon in the system tray near the clock. Select Settings. Go to the Account tab. Under the stale account entry, click Unlink this PC. Confirm the prompt. This stops the sync relationship but does not delete local files or cached credentials. - Close OneDrive Completely
Right-click the OneDrive cloud icon again. Select Quit OneDrive. Wait 10 seconds. This ensures no process is holding the registry keys or credential handles open. - Open Credential Manager and Delete Stale Entries
Press Windows + R, typecontrol keymgr.dll, and press Enter. Click Windows Credentials. Scroll down to Generic Credentials. Look for entries that containMicrosoftOneDriveor the domain of the stale tenant for examplecontoso.sharepoint.com. Click the arrow next to each entry, then click Remove. Confirm the deletion. Delete all entries that match the stale account. - Open Registry Editor and Delete the Stale Account Key
Press Windows + R, typeregedit, and press Enter. Navigate toHKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts. You will see subkeys namedBusiness1,Business2, and so on. Right-click the subkey that corresponds to the stale account. To identify the correct key, click the subkey and look at theServiceEndpointUrivalue in the right pane. It contains the tenant domain. Right-click the subkey and select Delete. Confirm the deletion. - Delete or Move the Local OneDrive Folder for the Stale Account
Open File Explorer. Navigate to the folder where the stale account was syncing. The default location isC:\Users\YourName\OneDrive - Contoso. Right-click the folder and select Delete. If you prefer to keep the files, move the folder to a different drive or to your desktop before deleting the sync folder. Do not leave the folder in the original location, as OneDrive may try to reconnect it. - Restart Windows and Verify Removal
Restart your computer. After the restart, sign in and open OneDrive. Right-click the cloud icon and select Settings. Go to the Account tab. The stale account should no longer appear. If it still shows, repeat steps 3 and 4. Some organizations deploy group policies that re-add accounts. In that case, contact your IT administrator to remove the policy.
If OneDrive Still Shows the Stale Account After Removal
OneDrive Readds the Stale Account After Every Restart
This usually happens because a group policy or a startup script pushes the account back. Open the Local Group Policy Editor by typing gpedit.msc in the Run dialog. Navigate to Computer Configuration > Administrative Templates > Windows Components > OneDrive. Look for any policy that specifies a tenant ID or account. If you find one, set it to Not Configured. If you are on a company-managed device, you cannot override this. Contact your IT administrator.
Credential Manager Entries Return After Deletion
Some Microsoft 365 apps such as Teams or Outlook refresh the stale credentials when they start. Before deleting credentials, sign out of all Microsoft 365 apps. Close Outlook, Teams, Word, Excel, and any other app that uses your work or school account. Then repeat the Credential Manager cleanup. After cleanup, sign back into only the apps that use the correct tenant.
OneDrive Shows a Stale Account That Is Grayed Out
A grayed-out account indicates that the registry key is still present but the sync relationship is broken. This happens when you unlink through the sync app but do not delete the registry key. Open Registry Editor and delete the Business1 subkey as described in step 4. The grayed-out entry disappears after the next OneDrive restart.
Unlink vs Remove vs Delete: Key Differences
| Item | Unlink this PC | Remove Credentials | Delete Registry Key |
|---|---|---|---|
| What it does | Stops sync for that account | Clears cached OAuth tokens and passwords | Removes the account identifier from Windows |
| Local files remain | Yes | Yes | Yes |
| Account reappears after reboot | Possible | Possible | No |
| Required for complete removal | Yes | Yes | Yes |
Unlinking alone is not enough. Credential and registry cleanup are required to prevent the stale account from returning.
You can now remove any stale OneDrive Business account from Windows 11 or Windows 10 by following the unlink, credential, and registry steps in order. After removal, restart OneDrive and verify that only the active account appears in the Account tab. If you manage multiple tenants, use the registry key naming pattern Business1, Business2, and so on to identify each account. For advanced cleanup, run the Microsoft SaRA tool with the OneDrive account removal scenario to automate the credential and registry deletion.