How to Automatically Sync SharePoint Libraries with OneDrive Using Group Policy
Question details
Administrators want to automatically configure SharePoint library synchronization across multiple user devices without requiring manual sync selections.

- Product
- OneDrive and SharePoint
- Device & OS
- Windows 10
- Scenario
- Deploying a global configuration for a group of users to ensure specific team site libraries are automatically synced to their local devices.
- Observed behavior
- Users currently have to manually click 'Sync' on SharePoint libraries, which causes inconsistencies and requires IT intervention to automate the process via Group Policy.
Verify that all target devices are running Windows 10 Fall Creators Update (version 1709) or later, and ensure that OneDrive Files On-Demand is enabled in your tenant.
Configure the OneDrive Group Policy for Automatic Synchronization
Use the OneDrive Administrative Templates to enforce the 'Configure team site libraries to sync automatically' policy across your domain.
To apply this setting, you must first copy the latest OneDrive .admx and .adml administrative template files to your domain's central store or local PolicyDefinitions folder. This policy specifically applies to Microsoft 365 SharePoint Online environments.
Download the latest OneDrive administrative templates and place the .admx and .adml files into your domain controller's Central Store or the local Computer Configuration PolicyDefinitions folder.
Launch the Group Policy Management Editor (gpedit.msc) and navigate to Computer Configuration > Policies > Administrative Templates > OneDrive.
Locate the policy named 'Configure team site libraries to sync automatically', double-click it, and set the toggle to 'Enabled'.
In the Options box, click 'Show' to open the input grid. Paste the specific SharePoint Library IDs you want to synchronize. You can copy these IDs directly from the SharePoint site by clicking the Sync button online.
Click 'OK' to save your changes. Have users run 'gpupdate /force' in their Command Prompt, or wait for the next automatic Group Policy refresh cycle for the libraries to begin syncing.

Open and Edit Your Synced SharePoint Files Seamlessly with WPS Office
Once your SharePoint and OneDrive libraries are automatically syncing to local machines, you need a fast and reliable office suite to manage those documents. WPS Office provides a lightweight, full-featured workspace to open, edit, and collaborate on your synced files without heavy subscription costs.

Frequently Asked Questions
Can this sync policy be configured for specific groups of users instead of everyone?
Yes, you can target the Group Policy Object (GPO) to specific Organizational Units (OUs) or apply Security Filtering to ensure the policy only runs for designated security groups or departments.
How do I find the Library ID to put into the Options box?
Log into your SharePoint Online site via a web browser, navigate to the document library you want to sync, and click the 'Sync' button. When the prompt appears, choose the option to 'Copy library ID' instead of opening OneDrive, then paste it into the Group Policy editor.
Why aren't the SharePoint libraries syncing after applying the Group Policy?
Ensure that the devices have updated their Group Policy (run gpupdate /force), are running Windows 10 version 1709 or newer, and most importantly, verify that the 'Files On-Demand' feature is turned on in the OneDrive client.
Does this automated synchronization work for on-premises SharePoint servers?
No, the automated OneDrive Group Policy sync setting is strictly designed for Microsoft 365 SharePoint Online sites. It does not support on-premises deployments.




