Automatically Sync Sharepoint Site Libraries using Intune

In this blog post, I will demonstrate the steps to automatically sync SharePoint site libraries using Intune. Once we configure this setting, OneDrive app will automatically download the contents of the specified libraries in online-only mode. Users will not be able to stop the syncing of libraries, as it would be managed by Intune.

Once the policy is applied, user’s will only notice this change when they sign in to their OneDrive app next time, which could be during the next Sign-in on their Windows 10/11 device. Also, It may take up to 8 hours for the sync to begin. If users have signed out and signed back on their device and do not see the libraries synced to their device yet, then they just need to wait for the sync to start.

Configure OneDrive Auto Sign-in Using Intune.

Profile typeCategorySettingStatus
Settings CatalogOneDriveConfigure team site libraries to sync automatically (User)Enable it and provide Name and Library ID

Important points

  • OneDrive Files On-Demand must be enabled to use this setting.
  • Applies to Windows 10 (1709) or later.
  • Do not enable this setting for the same library to more than 1,000 devices.
  • To ensure a good sync experience, avoid enabling this feature on a large document library.

Copy Library ID of the Sharepoint Site

You will need to copy the library ID of each SharePoint site you want to sync automatically. Let’s check the steps on how to copy the library ID.

  1. Open a Sharepoint site document library.
  2. Click Documents > Settings > Library settings.
Click Library settings
  • Click on More library settings.
Click More library settings
  • Observe the URL in your browser’s address bar. It should include a parameter like List=%7Bxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%7D. Anything in between %7B and %7D is a site Library ID. Copy the text and paste it in a notepad somewhere, we will need library ID info in the next step.
Copy the SPO document Library ID

Create a Device Configuration Profile

After copying the library ID of all SharePoint sites you want to sync automatically. Create a device configuration profile on Intune admin center to deploy this configuration on users devices.

  • Sign in to Intune admin center > Devices > Configuration > Create > New Policy.
  • Platform: Windows 10 and later.
  • Profile Type: Settings Catalog. Click Create.
  • Basics: Provide a Name and Description of the profile.
  • On Configuration settings tab, click on + Add settings and use the Settings picker to search using configure team site libraries keyword and select OneDrive category. Select Configure team site libraries to sync automatically (User).

This setting lets you specify SharePoint team site libraries to sync automatically the next time users sign in to the OneDrive sync app (OneDrive.exe). It may take up to 8 hours after a users signs in before the library begins to sync. To use the setting, you must enable OneDrive Files On-Demand, and the setting applies only for users on computers running Windows 10 (1709) Fall Creator’s Update or later.

Do not enable this setting for the same library to more than 1,000 devices. To ensure a good sync experience, avoid enabling this feature on large libraries sets (For the most up-to-date guidance, see https://docs.microsoft.com/en-us/onedrive/use-group-policy#AutoMountTeamSites).

This feature is not enabled for on-premises SharePoint sites.   If you enable this setting, the OneDrive sync app will automatically download the contents of the libraries you specified as online-only files the next time the user signs in. The user won’t be able to stop syncing the libraries.   If you disable this setting, team site libraries that you’ve specified won’t be automatically synced for new users. Existing users can choose to stop syncing the libraries, but the libraries won’t stop syncing automatically.

About Configure team site libraries to sync automatically (User) setting

Configure team site libraries to sync automatically (User)
  • Use the toggle switch to enable Configure team site libraries to sync automatically (User). Enter the name and library ID for each SharePoint library you want to sync, then click Next.
Provide the SPO library name and library ID to sync
  • Scope tags (optional): A scope tag in Intune is an RBAC label you add to resources (policies, apps, devices) to limit which admins can see and manage them. For more Information, read: How to use Scope tags in Intune.
  • Assignments: Assign the policy to Entra security groups that contain the target users or devices. As a best practice, pilot with a small set first; once validated, roll it out more broadly. For guidance on assignment strategy, see Intune assignments: User groups vs. Device groups.
  • Review + create: Review the deployment summary and click Create..

Sync Intune Policies

The device check-in process might not begin immediately. If you’re testing this policy on a test device, you can manually kickstart the Intune sync either from the device itself or remotely through the Intune admin center.

Alternatively, you can use PowerShell to force the Intune sync on Windows devices. Another way to trigger the Intune device check-in process is by restarting the device.

It may take some time to sync the SharePoint libraries. In my case, I had to leave it over the weekend to get the libraries synced on the PC. For more information, please refer to the following Microsoft techcommunity forum link about this issue.

Note

Read Next

Leave a Comment