When a user reports that OneDrive sync is stuck, showing errors, or failing to sync a specific SharePoint document library, the standard fix of unlinking and relinking OneDrive from the account can be too aggressive. That method resets sync for all sites and personal files, which wastes time and risks data loss. This article explains how to reset sync for a single SharePoint site using a SharePoint admin command, without affecting other synced locations.
The root cause is typically a corrupted local sync cache, a broken file lock, or a stale sync relationship that Microsoft Sync Engine cannot resolve on its own. By clearing only the cache and registry entries tied to that one site, you preserve the user’s other sync connections and avoid a full re-sync of unrelated data.
This guide covers the exact PowerShell commands and manual steps to reset sync for one SharePoint site, plus how to verify the fix and handle common failure patterns.
Key Takeaways: Reset OneDrive Sync for a Single SharePoint Site
- SharePoint Management Shell > Stop-SPOSync: Terminates the sync relationship for a specific site URL without unlinking the user’s entire OneDrive.
- Windows Registry > HKCU\Software\Microsoft\OneDrive\Accounts\Business1: Stores per-site sync metadata; deleting the correct subkey removes only that site’s sync state.
- OneDrive > Settings > Account > Stop Sync: A button that lets users stop sync for a single library, but it does not clear the local cache.
Why OneDrive Sync Fails for One SharePoint Site
OneDrive sync uses a local database and cache files stored under %LocalAppData%\Microsoft\OneDrive. When a single SharePoint site’s sync encounters corruption, file conflicts, or a sync token mismatch, the entire sync engine can stall for that site while other sites continue to work. The Microsoft Sync Engine does not automatically repair per-site corruption because it treats each sync relationship as an isolated session.
The common triggers include:
- A user moved or deleted a folder that OneDrive was tracking
- A file with a long path or special character blocks the sync queue
- The sync token stored in the local database is older than the server’s current token
- Third-party antivirus software locks files during sync
Resetting sync for just that site removes the local metadata and forces the engine to re-enumerate the library from SharePoint, preserving all other sync relationships.
Steps to Reset OneDrive Sync for One SharePoint Site
You need SharePoint admin permissions in the Microsoft 365 admin center and local administrator access on the user’s machine. Perform these steps in order.
- Identify the affected site URL
Open the SharePoint admin center at admin.microsoft.com/SharePoint. Go to Active sites and locate the site. Copy the site collection URL, for example https://contoso.sharepoint.com/sites/ProjectAlpha. - Run Stop-SPOSync from SharePoint Management Shell
Open SharePoint Management Shell as an administrator. Connect to your tenant withConnect-SPOService -Url https://contoso-admin.sharepoint.com. RunStop-SPOSync -SiteUrl "https://contoso.sharepoint.com/sites/ProjectAlpha". This command terminates the sync relationship for that site on the server side. It does not delete files or affect other sites. - Clear the local sync cache for that site
On the user’s machine, close OneDrive completely. Right-click the OneDrive icon in the system tray and select Pause syncing > Quit OneDrive. Open File Explorer and navigate to %LocalAppData%\Microsoft\OneDrive\settings\Business1. Look for a folder named with the site ID (a long alphanumeric string). Delete that folder. This removes the local database and cache for only that site. - Remove the registry key for the site
Press Windows Key + R, type regedit, and press Enter. Navigate to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. Under Business1, locate a subkey that contains the site URL in its name, for example {12345678-1234-1234-1234-123456789abc}. Right-click that subkey and select Delete. Confirm the deletion. This step prevents OneDrive from trying to resume a broken sync session. - Restart OneDrive and re-sync the library
Open OneDrive from the Start menu. Sign in if prompted. Click the OneDrive icon in the system tray, select Settings > Account > Choose folders. Find the site library that was stuck and check the box to sync it. OneDrive will re-download the file listing from SharePoint and rebuild the local cache.
If OneDrive Sync Still Has Issues After the Main Fix
OneDrive Shows “Syncing” but No Files Appear
If the library remains empty after re-syncing, the user may have a filter or view setting that hides files. Open the library in a browser and check the current view. Also verify that the user has at least Read access to the library. Run Test-SPOSite -Identity "https://contoso.sharepoint.com/sites/ProjectAlpha" in SharePoint Management Shell to confirm the site is healthy.
Sync Errors Persist After Clearing Cache
Some file names or paths violate OneDrive’s 400-character limit. Run the SharePoint document library through the “Check for issues” tool in the browser library settings. Rename or move any files with names that include characters like # % & or that exceed 256 characters. After cleaning the library, repeat the reset steps.
OneDrive Sync Stops for All Sites After Resetting One Site
This indicates that the registry key deletion affected the parent Business1 key instead of the site-specific subkey. Restore the registry from a backup or re-create the Business1 key by signing out of OneDrive and signing back in. Then re-sync only the affected site using the steps above.
| Item | Full OneDrive Reset | Single Site Reset |
|---|---|---|
| Scope | All synced sites and personal OneDrive | One SharePoint site only |
| Affects personal files | Yes | No |
| Requires re-authentication | Yes | No |
| Time to complete | 15–30 minutes | 5–10 minutes |
| Admin privileges needed | Local admin only | SharePoint admin + local admin |
You can now reset OneDrive sync for a single SharePoint site without disrupting the user’s other sync connections. Use the SharePoint Management Shell Stop-SPOSync command as the first step, then clean the local cache and registry key. For recurring issues, run the SharePoint Health Check tool on the document library to identify problematic files before resetting sync again. As an advanced tip, automate the registry cleanup by deploying a PowerShell script via Microsoft Intune that deletes the site-specific subkey based on the site ID reported in the OneDrive logs.