OneDrive for Business shared library sync stays pending for large document libraries: Fix Guide
🔍 WiseChecker

OneDrive for Business shared library sync stays pending for large document libraries: Fix Guide

When you sync a shared document library in OneDrive for Business, the sync status may remain stuck on “Pending” for hours or even days. This problem occurs most often with libraries that contain more than 5,000 files or 20,000 items total. The root cause is a combination of OneDrive’s internal file index limits and the way shared libraries synchronize metadata differently from personal OneDrive folders. This article explains why large shared libraries stall during sync and provides structured steps to resolve the pending state so you can access your files locally.

Key Takeaways: Fixing a Pending Sync on Large Shared Libraries

  • OneDrive Settings > Sync and backup > Manage backup > Stop backup: Use this to break the stuck sync relationship for the shared library before re-adding it.
  • SharePoint Online site settings > Storage metrics > Large list or library: Check if the library exceeds OneDrive sync limits of 5,000 files per library folder.
  • SharePoint > Library settings > Indexed columns: Add indexed columns to speed up sync queries and reduce pending time.

ADVERTISEMENT

Why OneDrive Sync Gets Stuck on Pending for Large Shared Libraries

OneDrive for Business syncs shared libraries using the same sync engine that handles personal OneDrive folders. However, shared libraries in SharePoint Online have a different metadata structure. When you add a sync for a shared library, OneDrive must download a full file index before it can start copying files. For libraries with more than 20,000 items, the index size exceeds 50 MB. The sync engine may time out while processing this index, leaving the status permanently at “Pending.”

A secondary cause is the lack of indexed columns in the library. SharePoint uses default columns such as ID, FileLeafRef, and Modified. When a library has custom columns used in views or sorting without indexing, the sync engine must scan the entire library to resolve file metadata. This scanning operation can take several hours for libraries with more than 10,000 files. During that time, OneDrive shows “Pending” because it has not yet received the complete file list from the server.

A third factor is the OneDrive sync limit of 5,000 files per folder. If the shared library has a folder containing more than 5,000 files, the sync engine cannot process that folder. It leaves the entire library in a pending state instead of showing a partial sync error. This behavior is by design to prevent data corruption, but it misleads users into thinking the whole sync is stalled.

Steps to Clear a Pending Sync for a Large Shared Library

Before you begin, confirm that your library size is the cause. Open the SharePoint library in a browser. At the bottom of the page, look for the item count. If it exceeds 20,000 items, proceed with the steps below. If the count is lower, the cause may be a network issue or a corrupted local cache. These steps apply to Windows 11 and Windows 10.

  1. Stop the sync for the shared library
    Right-click the OneDrive icon in the system tray and select Settings. Go to the Sync and backup tab. Click Manage backup. Find the shared library in the list and click Stop backup. Confirm the action. This removes the sync relationship without deleting your local files.
  2. Clear the OneDrive sync cache
    Press Windows key + R, type %localappdata%\Microsoft\OneDrive\settings, and press Enter. Close OneDrive from the system tray. Delete all files and folders inside the settings directory except the Personal and Business folders. Restart OneDrive. This forces a fresh metadata download when you re-add the library.
  3. Add indexed columns to the shared library
    In the browser, go to the SharePoint library. Click the gear icon and select Library settings. Under Columns, click Create column. Add indexed columns for any custom columns used in your library views. For example, if you sort by Department, create a Department column and set Indexed to Yes. Repeat for columns used in filters. This reduces the sync engine’s query time.
  4. Re-add the shared library for sync
    Open OneDrive Settings again. Go to the Sync and backup tab. Click Manage backup. Click Add a folder. Navigate to the shared library in the SharePoint sites list. Select the library and click Sync. OneDrive will start syncing with a fresh index. The pending status should change to syncing within 10 minutes for libraries under 30,000 items.
  5. Monitor sync progress
    Click the OneDrive icon in the system tray to open the sync activity panel. Look for the library name. If it shows “Processing changes” for more than 30 minutes, proceed to the next section for additional fixes.

ADVERTISEMENT

If OneDrive Still Shows Pending After the Main Fix

OneDrive Shows Pending for More Than 2 Hours

If the pending status persists beyond 2 hours after completing the steps above, the library likely exceeds the 100,000-item sync limit. OneDrive cannot sync a library with more than 100,000 items under any configuration. The only fix is to reduce the library size. Move older files to an archive library or create separate libraries for different departments. After reducing the item count below 100,000, repeat the steps in the previous section.

OneDrive Syncs Some Folders but Not Others in the Same Library

This occurs when a subfolder in the library contains more than 5,000 files. OneDrive skips the oversized folder and leaves the parent library in a pending state. To fix this, open the SharePoint library in a browser. Navigate to the oversized folder. Move files into subfolders so that no folder contains more than 5,000 items. After reorganizing, right-click the OneDrive icon and select Resume sync. The pending status should clear within 30 minutes.

OneDrive Sync Error 0x8007017C on Large Libraries

Error 0x8007017C means the file path exceeds 400 characters. When a shared library has deep folder structures, the combined path of “SharePoint site name” + “Library name” + “Folder path” + “File name” can exceed the Windows path limit. OneDrive shows pending while it tries to process these files. To fix, shorten folder names in the library. Use abbreviations or remove unnecessary levels. After shortening paths, restart OneDrive from the system tray menu.

OneDrive Sync Limits vs SharePoint Library Limits: Key Differences

Item OneDrive for Business Sync SharePoint Online Library
Maximum total items per library 100,000 items 30 million items
Maximum files per folder 5,000 files 30,000 files per view
Maximum file size 15 GB 250 GB
Sync index timeout 30 seconds per 1,000 items No timeout

OneDrive sync limits are much stricter than SharePoint Online library limits. A library that works perfectly in the browser may fail to sync. Always check the item count and folder structure before syncing a shared library.

After completing the steps above, you can now sync large shared libraries without the pending status. If the problem returns, check the library item count monthly and archive old content. For libraries with over 50,000 items, consider using the SharePoint mobile app instead of syncing. An advanced tip: use SharePoint Power Automate flows to move files older than 90 days to an archive library automatically. This keeps your synced library under the 5,000-file-per-folder limit.

ADVERTISEMENT