If you use OneDrive for Business on a Mac, you may see a sync loop after restarting your computer. The shared library starts syncing, stops, and then restarts repeatedly without completing. This loop usually happens because the OneDrive app loses its authentication tokens for the shared library during the restart process. This article explains why the loop occurs, provides step-by-step fixes to break the cycle, and covers related sync failures you may encounter.
Key Takeaways: Fix Sync Loops for Shared Libraries on Mac
- OneDrive > Preferences > Account > Unlink this Mac: Removes all cached credentials and forces a fresh authentication for all libraries.
- ~/Library/Application Support/OneDrive folder deletion: Clears corrupted sync metadata that causes the restart loop.
- Keychain Access > login > com.microsoft.OneDrive: Deletes stale OAuth tokens that prevent the shared library from authenticating after reboot.
Why the Shared Library Sync Loop Occurs on Mac After Restart
OneDrive for Business uses OAuth 2.0 tokens to authenticate with shared libraries. When you restart your Mac, the OneDrive app relaunches and tries to reconnect to all libraries using cached tokens. If a token for a shared library is expired, revoked, or corrupted, the app enters a sync loop: it attempts to authenticate, fails, retries, fails again, and repeats indefinitely. The loop is specific to shared libraries because they require separate permissions that are not always refreshed correctly during the system restart sequence.
The Role of the macOS Keychain
OneDrive stores its authentication tokens in the macOS Keychain under the entry com.microsoft.OneDrive. After a restart, the app reads this entry. If the entry contains stale or malformed data, the app cannot complete the handshake with the Microsoft 365 authentication service. The sync engine then retries the connection every few seconds, creating the loop you see in the menu bar icon.
How the Loop Manifests
You will see the OneDrive cloud icon cycle through syncing and idle states. The activity center shows messages such as “Syncing” followed by “Changes paused” or “Sign in required” for the shared library. The loop consumes CPU and network resources and prevents the library from reaching the “Up to date” state.
Steps to Stop the Sync Loop and Restore Normal Syncing
The following steps clear the corrupted tokens and metadata that cause the loop. Perform them in the order listed. Do not skip any step.
- Quit OneDrive completely
Click the OneDrive cloud icon in the menu bar, select Help and Settings > Quit OneDrive. Confirm that the app is no longer running by checking Activity Monitor for any OneDrive processes. - Delete the OneDrive cache folder
Open Finder, press Shift+Command+G, and enter~/Library/Application Support/OneDrive. Move the entire OneDrive folder to the Trash. Do not delete the main OneDrive folder in your user directory — only delete the Application Support folder. This removes sync metadata that may be corrupted. - Remove the OneDrive keychain entry
Open Keychain Access from Applications > Utilities. In the search box, typecom.microsoft.OneDrive. Select all entries that appear and delete them. You will be prompted for your Mac password. This clears stale OAuth tokens. - Restart your Mac
Choose Apple menu > Restart. A clean restart ensures that no leftover OneDrive processes remain in memory. - Launch OneDrive and sign in again
Open OneDrive from the Applications folder. Sign in with your work or school account. When prompted, allow OneDrive to access your Keychain. The app will re-authenticate and generate fresh tokens. - Re-add the shared library
Click the OneDrive icon in the menu bar, select Help and Settings > Preferences > Account tab. Under Shared Libraries, click Add a shared library. Enter the URL of the shared library or search for it by name. Select Sync all files or choose specific folders. The library should now sync without looping.
Alternative Method: Unlink and Relink OneDrive
If the loop persists after the steps above, unlink OneDrive from your Mac entirely.
- Unlink OneDrive
Click the OneDrive icon, select Help and Settings > Preferences > Account tab. Click Unlink this Mac. Confirm the action. - Delete remaining cached files
Open Finder, press Shift+Command+G, and enter~/Library/Application Support/OneDrive. Delete the folder if it still exists. Also delete the folder at~/Library/Group Containers/UBF8T346G9.OneDriveStandaloneSuite. - Clear keychain entries again
Open Keychain Access and delete any remainingcom.microsoft.OneDriveentries. - Set up OneDrive from scratch
Launch OneDrive, sign in, and configure your personal OneDrive first. Then add the shared library as described in step 6 of the main method.
If OneDrive Still Has Issues After the Main Fix
Some Mac users experience related failures even after breaking the initial loop. The following issues have distinct causes and fixes.
OneDrive asks for password repeatedly after restart
This happens when the Keychain entry is present but the token inside is expired. Open Keychain Access, locate com.microsoft.OneDrive, and delete it. Then go to OneDrive Preferences > Account and click Sign Out, then Sign In again. Do not use the password prompt that appears in the menu bar — always use the Preferences window.
Shared library shows “Changes paused” every few minutes
This indicates a throttling condition. OneDrive pauses sync when the library has too many pending changes or when the network is unstable. Check the activity center for details. To resolve, pause syncing manually for 30 minutes by right-clicking the OneDrive icon and selecting Pause syncing > 2 hours. After the pause, resume syncing. The loop should stop.
OneDrive consumes high CPU after restart even after fixing the loop
High CPU usage after the fix often means OneDrive is re-indexing the library. This is normal for the first sync after clearing the cache. Let the process run for up to one hour. If CPU usage stays above 50% for longer, open Activity Monitor, force quit OneDrive, and restart it. If the problem repeats, reset OneDrive by running the unlink procedure again.
Files On-Demand vs Always Keep on This Device: Impact on Sync Loops
| Item | Files On-Demand | Always Keep on This Device |
|---|---|---|
| Description | Files appear as placeholders and download only when opened | All files in the folder are downloaded and kept locally |
| Impact on sync loop | Lower chance of loop because fewer files are actively synced | Higher chance of loop because the app tries to sync all files at once |
| Recovery after loop fix | Faster — app only syncs metadata | Slower — app must re-download every file |
| Recommended after loop | Use temporarily until the library is stable | Switch to this only after the library shows “Up to date” |
After you break the sync loop, set the shared library to Files On-Demand for at least 24 hours. Right-click the library folder in Finder, select OneDrive > Free up space. This prevents the app from downloading all files immediately and reduces the chance of a second loop.
You can now stop the shared library sync loop on your Mac by clearing the OneDrive cache, deleting the keychain token, and re-adding the library. Next, monitor the library for 24 hours to confirm the loop does not return. As an advanced tip, create a scheduled task using the macOS Calendar app that runs the command killall OneDrive && open /Applications/OneDrive.app every Monday morning to preemptively clear any token issues before the work week starts.