Reviewing the latest OneDrive features I wanted to try the new AutoMountTeamSites setting which lets you preconfigure SharePoint online sites to sync automatically for a defined set of users.

The setting is described as follow:

This setting lets you specify SharePoint team site libraries to sync automatically the next time users sign in to the OneDrive sync client (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 Creators Update or later. Do not enable this setting for the same library to more than 1,000 devices. This feature is not enabled for on-premises SharePoint sites.  
If you enable this setting, the OneDrive sync client 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.


Here the prerequisites I've tested the setting with. Please notice that these are not official prerequisites! I'll update this post as soon as an official documentation becomes available.

Please feel free to test the setting with other prerequisites so I can update this post accordingly.

ADMX backend policies

Normally I'm a fan of Intune OMA-URI and ADMX Backend Policies to deploy GPO settings with Intune. Unfortunately I had a lot of issues for this setting and kept testing for a long time. The problem ist, that the required values are simply to large (number of characters) to deploy the settings with the MDM client extension.

Gathering the SharePoint library ID

We need to gather the SharePoint library ID which is an encoded  HTML URL of your SharePoint library.

To get the library ID navigate to your SharePoint site, click Sync and then Copy library ID.

Required registry settings

Enabling the feature is quite easy. We simply need to set a registry key under the following location:


Choose a suitable name (this has no technical impact as the original SharePoint library name is used) as value use the copied sharepoint library ID from above.  

PowerShell snippet

To set the registry key with an Intune PowerShell script you can use the following snippet and update it with your values:

For the Intune deployment use the following values and assign it to your targeted OneDrive and SherePoint users:

End user experience

After the next sign-in it took a few minutes and the SharePoint library was visible on my lab-machine:


  • I was able to stop syncing the preconfigured library which should not be possible according to the documentation
  • I'm looking forward to configure those settings trough ADMX ingestion

Have fun playing around with the AutoMountTeamSites setting.

ADMX Ingestion

If you want to reproduce my ADMX Ingestion approach, I've used those values:

Name AutoMountTeamSites
Description Testing the feature with these OMA-URI settings
OMA-URI ./Device/Vendor/MSFT/Policy/Config/OneDriveNGSC~Policy~OneDriveNGSC/AutoMountTeamSites
Data type String
Value <enabled/> <data id="AutoMountTeamSitesListBox" value="DemoTeamSite#xF000;Encoded SharePoint library ID"/>

I was able to write values into the registry with URL's like "" but not with encoded SharePoint library ID's.