OneDrive Tenant Migration Leaves Old Sync Roots on PCs
🔍 WiseChecker

OneDrive Tenant Migration Leaves Old Sync Roots on PCs

After a OneDrive tenant migration, many users find that their PCs still point to the old SharePoint site or personal library URL. Files may show as synced in File Explorer, but they cannot open, sync changes, or access the content. This happens because the migration process updates server-side records but does not automatically clean up the local sync database and registry entries. This article explains why old sync roots remain on PCs, provides a step-by-step method to remove them safely, and covers related failure patterns that can occur after a tenant migration.

Key Takeaways: Removing Stale OneDrive Sync Roots After Tenant Migration

  • OneDrive Settings > Account > Unlink this PC: The recommended first step to break the connection to the old tenant before re-syncing.
  • Registry Editor > HKCU\Software\Microsoft\OneDrive\Accounts\Business1: Contains stale tenant IDs and URLs that must be deleted to fully remove old sync roots.
  • %LocalAppData%\Microsoft\OneDrive\settings\Business1: Local cache files that store sync metadata; clearing them prevents residual entries from causing conflicts.

ADVERTISEMENT

Why Old Sync Roots Persist After Tenant Migration

When a OneDrive tenant migration occurs, the organization moves its Microsoft 365 domain and user data from one tenant to another. The server-side transition updates the SharePoint site URLs and user principal names, but the OneDrive sync client on each PC does not automatically detect this change. The client stores the original tenant ID, site URL, and sync relationship in the Windows registry and in local configuration files under the user's AppData folder. Because the sync client treats the old tenant as a separate service, it continues to display the old sync root in File Explorer with a gray or broken icon. The user sees the folder structure but cannot interact with the files because the authentication token no longer matches the new tenant.

The root cause is that the sync client's account registration is tied to a specific tenant ID. When the tenant changes, the client does not receive a signal to update that ID. Instead, the user must manually remove the old account association and re-add the new OneDrive for Business account. Simply unlinking the PC from OneDrive settings is often insufficient because registry keys and cached credentials remain. Without a full cleanup, the sync client may show duplicate OneDrive icons in the system tray or prompt for credentials repeatedly.

Steps to Remove Old Sync Roots and Reconnect to the New Tenant

Follow these steps in order to completely remove stale sync roots from a Windows 10 or Windows 11 PC. Perform these steps while signed in as the affected user.

  1. Unlink the PC from the old OneDrive account
    Right-click the OneDrive cloud icon in the system tray and select Settings. Go to the Account tab and click Unlink this PC. Click Unlink account in the confirmation dialog. This breaks the active sync connection but does not delete local files or remove registry entries.
  2. Close OneDrive completely
    Right-click the OneDrive icon in the system tray and select Quit OneDrive. Wait 10 seconds. Open Task Manager and verify that no OneDrive.exe process is running. If one is present, end the task manually.
  3. Delete the local OneDrive cache folder
    Press Win + R, type %LocalAppData%\Microsoft\OneDrive, and press Enter. Delete the settings folder and the logs folder inside this directory. Do not delete the main OneDrive executable folder.
  4. Remove stale registry keys
    Press Win + R, type regedit, and press Enter. Navigate to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. Right-click the Business1 key and select Delete. Confirm the deletion. If you see additional numbered keys such as Business2 or Personal, delete those as well if they correspond to the old tenant.
  5. Clear Windows Credential Manager entries
    Open Control Panel and go to User Accounts > Credential Manager > Windows Credentials. Scroll to the Generic Credentials section. Look for any entry containing OneDrive Cached Credential or the old tenant's URL. Click the arrow to expand the entry, then click Remove. Confirm the removal.
  6. Restart the PC
    Restart the computer to clear any remaining cached data and release file locks.
  7. Sign in to OneDrive with the new tenant account
    After restart, launch OneDrive from the Start menu. Sign in using the user's new Microsoft 365 credentials for the target tenant. During setup, choose the folders to sync. The sync client will create a fresh sync root at the default location under the user profile.

ADVERTISEMENT

If OneDrive Still Has Issues After the Main Fix

OneDrive Shows a Red X on Shared Office Files

After reconnecting, some Office files may display a red X in File Explorer. This indicates that the file is not syncing. The cause is often a stale Office document cache that still references the old tenant URL. Open any Office app such as Word, go to File > Account, and click Sign out under User Information. Close the app, reopen it, and sign in again with the new tenant credentials. The red X should clear within a few minutes.

Duplicate OneDrive Icons in the System Tray

If you see two OneDrive icons after migration, the old account was not fully unlinked. Repeat steps 1 through 5 above, paying special attention to the registry key deletion. Also check for a second Business1 key under HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts. Delete all keys except the one corresponding to the new tenant. Restart OneDrive again.

OneDrive Prompts for Credentials Repeatedly

Repeated credential prompts occur when Windows still holds a cached token for the old tenant. Open Credential Manager as described in step 5 and remove all entries that contain the old tenant domain or the string MicrosoftOffice16_Data:ADAL:. Then run dsregcmd /leave from an elevated Command Prompt to disjoin the device from the old Azure AD tenant. Reboot and sign in to OneDrive again.

Files On-Demand vs Always Keep on This Device After Migration

Item Files On-Demand Always Keep on This Device
Default setting after fresh OneDrive setup Enabled by default in Windows 10 and Windows 11 Disabled by default; user must enable per folder
Space usage on local drive Only placeholder metadata is stored; full file content is in the cloud Full file content is downloaded and stored locally
Behavior after tenant migration re-sync Placeholders are recreated from the new tenant; no full download needed All files are downloaded again, which can take hours for large libraries
Risk of stale sync root Low if old placeholders are deleted before re-sync High if old full files remain in the old sync folder path

After migration, the safest approach is to enable Files On-Demand before re-syncing. This prevents the client from downloading all files from the new tenant immediately. Users can then selectively mark folders as Always Keep on This Device only for the files they need offline.

You can now cleanly remove old sync roots from any PC that underwent a OneDrive tenant migration. The key is to unlink the account, delete the registry key, and clear credential manager entries before signing in to the new tenant. After the cleanup, use Files On-Demand to control local storage usage. An advanced tip is to run the OneDriveDiagnostics tool with the /repair switch after the registry cleanup to rebuild the sync database from scratch, which eliminates any leftover corruption.

ADVERTISEMENT