After you rename a SharePoint site, the Teams client may stop syncing files in a channel library. The sync button appears grayed out, or the OneDrive sync app shows a red error icon. This happens because Teams still references the old site URL and document library ID. This article explains why the sync breaks and shows you how to restore syncing in both the new Teams and classic Teams.
Renaming a SharePoint site changes the site’s URL path, but the underlying document library GUID remains the same. Teams stores a cached reference to the old URL, so the sync engine cannot locate the library. You will need to clear that cache and re-add the library with the new URL.
Key Takeaways: Restoring Channel Library Sync After a SharePoint Rename
- OneDrive sync app > Settings > Account > Stop sync: Removes the broken sync relationship for the channel library.
- Teams > Files tab > Sync button: Re-establishes sync using the new SharePoint site URL after the rename.
- Windows > Credential Manager > Windows Credentials: Clears stale SharePoint credentials that can block re-syncing.
Why a SharePoint Site Rename Breaks Teams Channel Sync
When you rename a SharePoint site, the site’s URL changes from example.sharepoint.com/sites/oldname to example.sharepoint.com/sites/newname. The underlying document library, which stores the channel files, keeps its internal ID. Teams and the OneDrive sync app store a mapping between the channel and the old URL. After the rename, that URL no longer exists, so the sync engine cannot resolve the library path.
The sync app also caches the site’s tenant and web ID. Even if the URL is updated in Teams, the cache may still hold the old identifiers. This is why you see errors like “Sync is unavailable” or “This library can’t be synced right now.” The fix requires two actions: stop the existing sync relationship and then re-add the library using the new URL.
What the Sync Error Looks Like
In the Teams Files tab, the Sync button may be grayed out. In the OneDrive sync app, the channel folder shows a red circle with a white cross. Clicking the error opens a message that says “We couldn’t sync this library because the site was moved or renamed.” The sync app may also log the error code 0x80070005, which indicates an access or path issue.
Steps to Stop the Broken Sync and Reconnect the Channel Library
Follow these steps in order. Do not skip the credential cleanup because stale credentials can cause the re-sync to fail silently.
- Stop syncing the affected library in OneDrive
Open OneDrive sync app settings by right-clicking the OneDrive cloud icon in the system tray and selecting Settings. Go to the Account tab, find the channel library under your work or school account, and click Stop sync. Confirm the action. This removes the broken sync relationship. - Clear the OneDrive sync cache for the library
Press Ctrl+Shift+Escape to open Task Manager. Under Processes, end all OneDrive.exe processes. Then open File Explorer and navigate to%LocalAppData%\Microsoft\OneDrive\logs. Delete the folder namedBusiness1orBusiness2that contains the old sync metadata. Restart OneDrive from the Start menu. - Clear stale SharePoint credentials from Credential Manager
Open Control Panel, select User Accounts, then Credential Manager. Click Windows Credentials. Look for entries that start withMicrosoftOffice16_Data:SPOorOneDriveC2:SPO. Remove any that reference the old site URL. This forces the sync app to prompt for fresh authentication. - Open the channel Files tab in Teams
In Teams, go to the channel that contains the library. Select the Files tab. If the tab shows a blank page or an error, press F5 to refresh the tab. Wait a few seconds for the file list to load. - Click the Sync button
In the Files tab, click the Sync button in the top right corner. If the button is still grayed out, click the ellipsis (…) next to it and select “Sync this library.” The OneDrive sync app will open and ask you to sign in if needed. - Verify the new URL in the sync settings
After syncing starts, open OneDrive settings and go to the Account tab. The channel library should now show the new site URL. If it shows the old URL, stop the sync again and repeat steps 2 through 5.
If Teams Still Cannot Sync After the Main Fix
Teams Shows a Blank Files Tab After the Rename
A blank Files tab usually means Teams cached the old channel ID. Sign out of Teams completely and sign back in. In Teams, click your profile picture, select Settings, then clear the cache by deleting the %AppData%\Microsoft\Teams folder. Restart Teams. This forces a fresh load of the channel metadata.
OneDrive Sync App Reports “This Library Can’t Be Synced Right Now”
This error appears when the sync app still holds the old site ID. Reset OneDrive by running the command onedrive.exe /reset in the Run dialog (press Win+R). Wait for the reset to complete, then open the channel Files tab and click Sync again.
Sync Works but Files Are Missing in the Local Folder
If files are missing, the sync app may have created a new folder instead of reusing the old one. Go to the OneDrive folder in File Explorer and check for a folder with the old site name. If it exists, move its contents into the new channel folder. Then right-click the new folder and select “Free up space” to re-download the files.
New Teams vs Classic Teams: Sync Behavior After a Site Rename
| Item | New Teams | Classic Teams |
|---|---|---|
| Sync button availability | Available after refreshing the Files tab | May require a full restart of Teams |
| Cache clearing | Use the in-app cache clearing option | Must delete the Teams folder in AppData manually |
| Credential handling | Reuses the same token, may not need cleanup | Often requires Credential Manager cleanup |
| Error messages | Shows a prompt to reload the tab | Shows a generic sync error without guidance |
The table shows that new Teams handles the rename more gracefully because it can reload the channel metadata on demand. Classic Teams relies heavily on the local cache, so you must clear it manually.
After you reconnect the library, test syncing by uploading a test file in the channel and checking that it appears in your local OneDrive folder. If you manage multiple channels, repeat the process for each affected library. For future site renames, consider using the SharePoint admin center to update the site URL before telling users to sync again.