You want to let users sync only one specific library from a SharePoint site, but the OneDrive sync app offers to sync the entire site. This happens because the default sync configuration in SharePoint allows users to sync any document library on a site. This article explains how to limit sync to a single department library using SharePoint site settings and the OneDrive sync app admin controls.
You will learn how to block sync for all libraries on a site and then enable sync for just one library. You will also see how to apply these settings for a single site or across many sites using PowerShell. These steps work for SharePoint in Microsoft 365, OneDrive for work or school, and the OneDrive sync app for Windows 10 and Windows 11.
Key Takeaways: Limit Sync to One Department Library
- SharePoint site settings > Library settings > Permissions for this document library: Break permission inheritance and remove the default Visitors group to prevent users from seeing all libraries.
- SharePoint admin center > Active sites > site > Settings > Sync: Disable sync for the whole site, then re-enable it only for the target library using the OneDrive admin center.
- OneDrive admin center > Sync > Manage device access: Use the SharePoint list or library sync policy to allow sync only for specific library IDs.
Why the Sync App Offers All Libraries on a Site
When a user clicks the Sync button on a SharePoint document library, the OneDrive sync app adds the entire site to the sync list, not just that one library. This is the default behavior for all SharePoint sites in Microsoft 365. The sync app sees each site as a single sync root. After the site is added, the user can choose which libraries to sync from the app interface, but the option to sync other libraries remains visible.
The root cause is that SharePoint does not have a per-library sync toggle. The sync setting exists only at the site level. To limit sync to one department library, you must disable site-level sync and then enable sync for that specific library through a separate policy. This requires access to the SharePoint admin center and the OneDrive admin center.
Prerequisites
You need the SharePoint Administrator or Global Administrator role in Microsoft 365. You also need the OneDrive sync app version 22.022 or later installed on user devices. For PowerShell methods, you need the SharePoint Online Management Shell module installed.
Steps to Disable Sync for the Entire Site
The first step is to block sync for all libraries on the SharePoint site. This removes the Sync button from every library on that site.
- Open the SharePoint admin center
Go to admin.microsoft.com and select SharePoint in the left navigation. If you do not see it, expand Admin centers and then click SharePoint. - Select the target site
In the left menu, click Active sites. Find the site that contains the department library. Click the site name to open its details panel. - Open the Sync settings
In the details panel, click the Settings tab. Scroll down to the Sync section. By default, the toggle is set to Allow sync for this site. - Disable sync for the site
Set the toggle to Block sync for this site. Click Save at the bottom of the panel. This removes the Sync button from all libraries on the site within a few minutes.
Steps to Enable Sync for Only One Library
After blocking site-level sync, you must create a policy that allows sync for the specific department library. This is done in the OneDrive admin center using the SharePoint list or library sync policy.
- Get the library ID
Go to the SharePoint site and navigate to the department library. In the browser address bar, copy the GUID that appears after list= in the URL. The URL looks likehttps://contoso.sharepoint.com/sites/DeptSite/DeptLib/Forms/AllItems.aspx?list=%7B01234567-89ab-cdef-0123-456789abcdef%7D. The part between %7B and %7D is the library ID. - Open the OneDrive admin center
Go to admin.microsoft.com, expand Admin centers, and click OneDrive. In the left navigation, click Sync. - Create a new policy
On the Sync page, click the SharePoint list or library sync policy tab. Click Add policy. Enter a name for the policy, such as “Allow Department Library Sync”. - Specify the library
Under Libraries, paste the library ID you copied earlier. Under Action, select Allow sync. Click Next. - Assign the policy
Choose Specific users or groups and select the security group that contains the department members. Click Next and then Create policy. The policy takes effect within 24 hours. Users in the group will now see the Sync button only on the allowed library.
If Users Still See Sync for Other Libraries
The sync policy prevents the Sync button from appearing, but users who already synced the site before the policy was applied will still see the other libraries in the OneDrive sync app. To fix this, you must remove the existing sync relationship.
Users See Other Libraries in the Sync App After the Policy Is Applied
Ask each user to open the OneDrive sync app, click the OneDrive icon in the system tray, select More and then Settings. Under the Account tab, click Choose folders for the site. Uncheck all libraries except the allowed one, and click OK. The sync app will remove the synced content for the unchecked libraries.
The Sync Button Is Missing from the Allowed Library
If the Sync button does not appear on the allowed library even after 24 hours, verify that the library ID in the policy matches the actual library GUID. Also confirm that the user is a member of the security group assigned to the policy. If both are correct, remove the policy and recreate it with the same settings.
Team Site vs Communication Site: Sync Behavior Comparison
| Item | Team Site | Communication Site |
|---|---|---|
| Default sync behavior | Sync button on every library syncs the entire site | Sync button on every library syncs the entire site |
| Sync policy support | Supported with per-library allow policy | Supported with per-library allow policy |
| Permission inheritance | Connected to Microsoft 365 Group; breaking inheritance affects group permissions | No group connection; permission changes affect only the site |
| Library ID format | Standard GUID in the URL | Standard GUID in the URL |
| Sync app behavior after policy | Only allowed library shows Sync button | Only allowed library shows Sync button |
Both site types respond identically to the sync block and per-library allow policy. The main difference is how permissions are managed. For a team site, breaking permission inheritance on a library can disconnect it from the Microsoft 365 Group, which may cause unexpected access changes for group members.
Limitations and Things to Avoid
The per-library sync policy does not block users from manually adding a library to the OneDrive sync app using the Add a folder option in the app. Users with edit permissions on the site can still sync any library by pasting the library URL. To prevent this, you must also restrict site-level permissions so that users cannot see libraries they should not access.
Do not break permission inheritance on a library unless you fully understand the impact. If you remove the Visitors group from a library in a team site, users who are not members of the site but have access to the library via sharing links will lose access. Use SharePoint groups and permission levels instead of direct user assignments to keep management simple.
The sync policy applies only to the OneDrive sync app for Windows and Mac. It does not affect the Sync button in SharePoint mobile apps or the ability to open files in the browser. Users can still upload and download files manually through the web interface.
You can now limit sync to one department library by blocking site-level sync and enabling a per-library policy. Start by disabling sync for the entire site in the SharePoint admin center. Then create a SharePoint list or library sync policy in the OneDrive admin center that allows sync only for the target library. For a more advanced setup, use the Set-SPOSite PowerShell cmdlet with the DisableSync parameter to block sync across multiple sites at once. This method is faster than changing settings one site at a time in the admin center.