How to fix a OneDrive document library that won’t sync


onedrive sync
Image credit: Microsoft

If OneDrive says “An error occurred while attempting to synchronize this document library,” open the same library in SharePoint with your work or school account. If you can open it online, check what the OneDrive desktop app reports. If SharePoint denies access, the site owner needs to check your permissions first.

Check which part of the library is affected

  1. Sign in to Microsoft 365 in your browser. Open the SharePoint site, select Documents or the affected library, and open a file you expected to see on the PC.
  2. Click the blue OneDrive cloud in the Windows notification area. Check that the account matches the one you used in SharePoint. If syncing is paused, resume it. If OneDrive lists a specific file, open the error details before changing settings for the whole library.
  3. If the library has never appeared in File Explorer, select Sync in the SharePoint library and allow the browser to open Microsoft OneDrive. If you already added a shortcut to that folder in OneDrive, look for the folder under your work OneDrive in File Explorer first.
SharePoint library toolbar with Sync highlighted beside Add shortcut to OneDrive
Select Sync in the SharePoint library to open it in OneDrive.

If SharePoint offers no Sync command or asks which library you want to sync, contact the site owner. Give them the library address and the exact message so they can check whether the site allows offline sync. Microsoft illustrates the command in its SharePoint library setup guide.

Reset the Windows sync app if several folders are stuck

A reset preserves your files but disconnects all OneDrive sync connections on this PC, including personal and work accounts. OneDrive then performs a full sync. First save any open documents and copy any local edits you cannot yet see online to a separate folder.

  1. Press Windows + R. Paste %localappdata%\Microsoft\OneDrive\onedrive.exe /reset and press Enter.
  2. If Windows cannot find that file, try C:\Program Files\Microsoft OneDrive\onedrive.exe /reset. If Windows still cannot find it, try C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe /reset. Stop once a command runs successfully.
  3. Open Start, search for OneDrive, and launch the desktop app. Allow the sync to finish. If you previously selected only certain folders, select them again for each account.

If Windows cannot find OneDrive at any of those locations, check whether the desktop sync app is installed. Microsoft provides the installer guidance and screenshots for each command in Reset OneDrive.

Verify that syncing has resumed

Check a recently changed file in both SharePoint and File Explorer, then check the OneDrive cloud icon for remaining errors. If only one file is stuck, follow its specific message. For a file lock, see what to do when OneDrive says a file is open in another program.

More about the topics: error, onedrive

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

User forum

0 messages