Script for Automatic Syncing

Not applicable

We have the "Silently configure OneDrive using primary Windows Account" Option enabled in our Active Directory which set ups a primary Onedrive. However, we have certain circumstances where a user will have access to a secondary OneDrive. Is there a way via AD, Intune, or a Powershell script to automatically configure access to a secondary OneDrive? Thanks in advance?

3 Replies

"If you want to auto-configure a SharePoint site to be synced, you can use the URL below as a guide to build the path to the SharePoint site you want to sync automatically. Replace HERE with the correct values for each component of the URL.

Note: Replace special characters like the period (.), hyphen (-), and at sign (@) with the corresponding encoded values. For example, if the URL includes a hyphen, replace the hyphen with its encoded value, %2D. Additionally, you will need Client Side Object Model (CSOM) knowledge to query the team site to determine the appropriate SiteID, WebID and ListID to build the appropriate URL.



best response
Note: Onedrive for Business sites = Sharepoint sites, Onedrive sites also have an ID for example.

Perfect...exactly what I needed