When your organization moves a department to a new Active Directory group or Azure AD organizational unit, OneDrive for Business shared library sync can get stuck on a pending state. This happens because the sync engine relies on cached permission tokens that no longer match the updated group membership. The library appears in OneDrive but never finishes syncing, showing a spinning icon or a pending status indefinitely. This article explains the root cause and provides verified steps to resolve the pending sync state without reinstalling OneDrive.
Key Takeaways: Resolving Pending Sync After Group Membership Changes
- OneDrive settings > Account > Unlink this PC: Clears cached permission tokens for all libraries and forces a fresh authentication with the new group membership.
- OneDrive settings > Sync and backup > Manage backup > Stop backup: Temporarily disables Known Folder Move to prevent conflicts during the pending library fix.
- Windows Credential Manager > Windows Credentials > Generic Credentials: Removing stale OneDrive credentials forces the sync engine to request new tokens from Microsoft 365.
Why OneDrive Shared Library Sync Stays Pending After a Department Migration
When an IT admin moves a department to a new security group or Azure AD organizational unit, the shared libraries that were previously synced may lose their permission mapping. OneDrive for Business uses OAuth tokens that are tied to the user’s group memberships at the time of initial sync. After the migration, the cached tokens no longer reflect the updated access rights. The sync engine detects a mismatch between the cached permissions and the server-side permissions, so it enters a pending state instead of syncing new files or changes.
The pending state is not a network or file conflict issue. It is a permission token stalemate. OneDrive cannot determine whether the user still has access to the library, so it refuses to sync any content. The library icon in File Explorer shows a spinning circle or a gray pending badge. This behavior is by design to prevent accidental data loss or unauthorized file access.
The issue can also occur if the migration changed the library’s SharePoint site URL or if the user was removed and re-added to the same group. In these cases, the sync relationship between the local folder and the remote library is broken. The only reliable fix is to reset the sync relationship and force OneDrive to re-evaluate permissions against the current Microsoft 365 configuration.
Step-by-Step Fix: Clear OneDrive Cache and Re-Sync the Library
- Stop Known Folder Move if active
Open OneDrive settings by right-clicking the OneDrive cloud icon in the system tray and selecting Settings. Go to Sync and backup > Manage backup. Click Stop backup for each folder listed (Desktop, Documents, Pictures). This prevents the sync engine from trying to back up local folders while you fix the pending library. - Unlink your PC from OneDrive
In OneDrive settings, click the Account tab. Under your account name, click Unlink this PC. Confirm the prompt. This removes all cached tokens and stops all sync activity. Your local files remain on your computer. - Clear Windows Credential Manager entries
Open Control Panel, then User Accounts > Credential Manager > Windows Credentials. Scroll to the Generic Credentials section. Look for any entries that contain OneDrive, SharePoint, or the library’s URL. Click the arrow next to each entry and select Remove. Confirm each removal. This step ensures no stale credentials remain. - Restart OneDrive
Press Ctrl + Shift + Esc to open Task Manager. Find Microsoft OneDrive in the list, right-click it, and select End task. Then open OneDrive from the Start menu or by typing OneDrive in the search bar. Sign in with your work or school account. OneDrive will re-authenticate and rebuild its cache. - Re-sync the shared library
Open the library’s SharePoint site in a web browser. Click the Sync button on the toolbar. OneDrive will prompt you to choose a local folder location. Select a new empty folder or use the default name. The sync will start fresh with the correct permission tokens. - Re-enable Known Folder Move
After the shared library syncs successfully, return to OneDrive settings > Sync and backup > Manage backup. Click Manage backup and turn on backup for Desktop, Documents, and Pictures again. This restores protection for your local folders.
If OneDrive Still Shows a Pending State After the Main Fix
The library has a new SharePoint URL after migration
If the department migration changed the SharePoint site URL, the old sync relationship points to a location that no longer exists. In this case, unlinking and re-syncing as described above will not work if the old library path is still cached in the site list. Go to OneDrive settings > Account > Choose folders. Click the library name and select Stop sync. Then follow steps 2 through 5 again. You must use the new SharePoint URL when you click Sync from the browser.
Multiple shared libraries are stuck pending
When more than one library is pending, the root cause is usually a broader token refresh failure. Run the OneDrive sync troubleshooter first. Open Settings > System > Troubleshoot > Other troubleshooters. Find OneDrive and run it. If the troubleshooter does not resolve the issue, perform the unlink and credential clear steps for all affected libraries at once. After re-authentication, sync each library one at a time. Syncing multiple libraries simultaneously can trigger the same pending state.
OneDrive reports a permission error instead of pending
If you see a red X or an error message that says You don’t have permission to sync this library, the migration may have removed your access entirely. Contact your IT admin to verify your group membership in Azure AD. Ask them to check the library’s permission settings in SharePoint admin center. Once access is confirmed, perform the unlink and credential clear steps to force a fresh permission check.
Unlink and Re-Sync vs Stop Sync and Re-Sync: Key Differences
| Item | Unlink This PC | Stop Sync on a Single Library |
|---|---|---|
| Scope | Removes all sync relationships for the account | Removes only the selected library’s sync relationship |
| Authentication tokens | All cached tokens deleted | Tokens remain cached for other libraries |
| Known Folder Move | Disconnected, must be re-enabled | Not affected |
| Best use case | Multiple libraries stuck or token-level issue | Single library with URL change or isolated permission error |
You can now resolve a pending shared library sync after a department migration by unlinking your PC, clearing credentials, and re-syncing with the correct SharePoint URL. After the fix, verify that other libraries and Known Folder Move are working correctly. As an advanced tip, use the OneDrive admin report in the Microsoft 365 admin center to check which users experienced sync failures during the migration period.