0

I have a requirement to 're-provision' SharePoint access for migrated users. At the moment I have an extract of users and the sites/groups they have access to, some of these users are internal and some are guest/external.

Has anyone found a way to bulk grant access? For example, Ideally I'd like to input the below in to SPO PowerShell via .csv and the script will grant access to the correct group.

[email protected], https://spo.sharepoint.com/sites/Test, Test Members

[email protected], https://spo.sharepoint.com/sites/DEV, Dev Visitors

Any help appreciated!

1 Answer 1

0

Import Csv file with header using below command and you will get array.

Import-Csv

You can loop this array and inside you can write below command.

Add-SPOUser -Site https://mytenant.sharepoint.com/sites/mysitecollection -Group "Group Name" -LoginName [email protected]

I hope it will simplfy your work.

Use this example for reference.

2
  • Hi Anil,. thanks great! However I noticed that the Add-SPOUser command does not work for external users (i.e. adding a user with an external domain). How can I achieve this?
    – C.Moore
    Jul 3, 2018 at 9:42
  • Moore, I am unsure that is there any such API is exposed by Microsoft. but you can use this link to bulk invite to external users. itgroove.net/mccalec/2016/01/19/…
    – Anil Pal
    Jul 3, 2018 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.