How to Automatically Sync Sharepoint Libraries to OneDrive

Boost your productivity by automating this small task

by Matthew Adams
Matthew Adams
Matthew Adams
Windows & Software Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things... read more
Affiliate Disclosure
  • There are two easy methods admin users can take advantage of in order to sync SharePoint to OneDrive automatically.
  • The OneDrive sync app enables users to configure team site libraries to sync automatically with Group Policy Objects.
  • You can configure team site libraries to sync automatically with Intunes’ administrative templates.
  • Alternatively, feel free to set up auto-sync for a SharePoint library with the Group Policy Editor.
How to sync SharePoint to OneDrive

OneDrive is one of the foremost cloud storage services for Windows. Microsoft SharePoint is a collaboration platform many organizations utilize for document management and storage.

Users can synchronize files in SharePoint Online libraries with OneDrive for Business across devices. It has been possible to automatically sync internal SharePoint libraries to a group of users since 2018.

However, there are some prerequisites and limits for SharePoint library/OneDrive automatic syncing. These are the prerequisites and limits:

  • The OneDrive Files On-Demand Must policy needs to be enabled
  • Must have Windows 10 (1709) or later
  • There’s a 1,000-device limit for syncing a specific document library
  • OneDrive ADML and ADMX files need to be copied into certain directories to enable the sync automatically policy for SharePoint libraries (as outlined below)
  • You’ll need to have OneDrive for Business installed
  • Don’t enable automatic syncing for SharePoint libraries that include more than 5,000 files

With all required prerequisites met, you can configure the SharePoint library to automatically sync with OneDrive via Group Policy Editor or Microsoft Intune.

How we test, review and rate?

We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.

For more details you can read how we test, review, and rate at WindowsReport.

To utilize Group Policy, you’ll also need Windows 10 Pro or Enterprise. This is how you can sync SharePoint to OneDrive automatically.

How do you automatically sync SharePoint libraries with OneDrive?

1. Install the OneDrive ADMX and ADML policy files

  1. First, open the File Explorer window by clicking the folder button on the taskbar.
  2. Open this folder in File Explorer: C:\Users\[USER]\AppData\Local\Microsoft\OneDrive\19.043.0304.0004\adm\
    adm folder sync sharepoint to onedrive automatically
  3. Right-click the OneDrive.admx file and select Copy.
    The copy option sync sharepoint to onedrive automatically
  4. Open this folder path: %systemroot%\PolicyDefinitions
  5. Right-click a space within the PolicyDefinitions folder and select Paste.
  6. Return to the adm folder at the path specified in step two.
  7. Then, you’ll need to right-click OneDrive.adml and select the Copy option for it.
  8. Next, open the language subfolder (such as en-US or en-UK) within the PolicyDefinitions folder.
  9. Right-click within the language subfolder to select Paste, which should add the OneDrive.adml file there.
Note icon NOTE
You’ll need to install the sync client admin template files as outlined above for both the Group Policy Editor and Intune methods below.

2. Automatically sync SharePoint with OneDrive via the Group Policy Editor

Copy the library ID 

  1. Open the Office 365 login page in a web browser.
  2. Click the Sign in button there to log in to your Office 365 account.
    The Office 365 page sync sharepoint to onedrive automatically
  3. Select SharePoint to log in to it.
  4. Open a SharePoint library you want to sync with OneDrive.
  5. Click the Sync button shown directly below.
    The Sync option sync sharepoint to onedrive automatically
  6. Next, click the Copy library ID option on the Getting ready to sync box that opens.
    Copy library ID option sync sharepoint to onedrive automatically
  7. Check you’ve got the link copied by pasting it into a Notepad text file with the Ctrl + V hotkey.

Enable the team site libraries policy

  1. Now you’ll need to launch Run, which you can do by pressing the Windows and R key combination.
  2. Enter this text in Run’s Open box: gpedit. msc
  3. Click OK to open the Group Policy Editor window.
    The Group Policy Editor window sync sharepoint to onedrive automatically
  4. Select User Configuration and Administrative Templates within Group Policy Editor.
  5. Then, select OneDrive on the left of Group Policy Editor.
  6. Double-click the Configure team site libraries to sync automatically policy for OneDrive.
  7. Click the Enabled radio button for that policy.
  8. Press the Show button for libraries.
  9. Input a name for the synced library within a blank Value name box.
  10. Then, paste the copied library ID into the Value field by pressing the Ctrl + V keyboard shortcut.
  11. Click OK on the Show Contents window.
  12. Press the Apply button, and click OK to exit the policy window.

There’s also a OneDrive sync policy at Computer Configuration > Admin Templates > OneDrive within Group Policy. That device policy applies to all users who log in.

3. Sync SharePoint with OneDrive with Microsoft Intune EndPoint Manager

  1. Copy the library ID for the library you want to automatically sync as outlined within the first seven steps of the previous method.
  2. Log in to your Intunes Endpoint Manager admin center within a web browser.
    Microsoft Endpoint Manager sync sharepoint to onedrive automatically
  3. Click Devices on the left of Intune.
  4. Select Profiles in the left sidebar, and click the Create profile option.
  5. Select Windows 10 and later on the Platform drop-down menu.
  6. Next, select the Administrative Templates option on the Profile type drop-down menu.
  7. Press the Create button to set up the profile.
  8. Input the name and optional description for the profile.
  9. Click the Next button to proceed to Configuration settings.
  10. Select User configuration and OneDrive.
  11. Then input Configure team site libraries to sync automatically in the search box to find that policy.
    The Configure team site libraries to sync option sync sharepoint to onedrive automatically
  12. Select the Enabled option for the Configure team site libraries to sync automatically policy.
  13. Input the library’s title in the Name text box.
  14. Paste the copied library ID in the Value box.
  15. Press the OK button.
  16. You can leave the Scope tags tab blank, and click the Next option.
  17. In the Assignment tab, you’ll need to specify a group that includes target users.
  18. Click the Next and Create buttons to finish.

Why is my SharePoint not syncing with OneDrive?

Sharepoint sync issues with OneDrive can arise from installation issues with the OneDrive app and local/server file copy conflicts.

The Microsoft Office Upload Center’s cache can also stop SharePoint from syncing with OneDrive. Check out our OneDrive not syncing guide for potential fixes.

So, that’s how you can configure SharePoint libraries to sync with OneDrive with Group Policy Editor or Intune automatically.

If you want to keep the files on the cloud, you can copy files from the OneDrive account to another, read this guide to learn how.

Whichever method you utilize, note that it can take up to eight hours for a SharePoint library to sync when you next log in to OneDrive automatically.