Forum Discussion
Script for Automatic Syncing
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?
- Note: Onedrive for Business sites = Sharepoint sites, Onedrive sites also have an ID for example.
- JosLiebenIron Contributor
"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.
odopen://sync/?siteId=SiteID_HERE&webId=WebID_HERE&listId=ListID_HERE&userEmail=UserEmail_HERE&webUrl=WebURL_HERE"
Source: https://support.office.com/en-us/article/deploy-the-new-onedrive-sync-client-in-an-enterprise-environment-3f3a511c-30c6-404a-98bf-76f95c519668- JosLiebenIron ContributorNote: Onedrive for Business sites = Sharepoint sites, Onedrive sites also have an ID for example.
- Deleted
Perfect...exactly what I needed