OneDrive Secondary Admin

Working on a tenant to tenant migration the customer was leveraging a 3rd party to migrate their OneDrive data to a new tenant. There was a requirement to have 20 service accounts added to each of the users OneDrive as a secondary admin. I created the following script to go through all the OneDrive URL’s and add the service accounts:

The service accounts will need to be created before running the script. You will need to update the last line AdminURL to match your tenant and change the UPN of each of the service accounts.

Leave a Reply

Your email address will not be published.