How To Obtain The List Of Security Groups (With Its Members) Of A SharePoint Online Site
As a best practice, it is highly recommended but in practice to keep an updated Security Book where all the Groups and User Accounts of a SharePoint Online site are listed can be a challenging task.
Many users ask how to obtain such a list when needed.
I show here how to obtain an Excel table list of the security groups (with its members) from a SharePoint Online site using PowerShell.
Firstly, we need to install the latest version from SharePoint Online Management Shell and connect using a Global Admin account.
Connect to SharePoint Online PowerShell From <https://technet.microsoft.com/en-us/library/fp161372.aspx>
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
See article: Index of Windows PowerShell for SharePoint Online cmdlets
Once connected run the following cmdlet:
- Get-SPOSiteGroup -Site $OrgSiteURL | OGV
- A table should open containing the Security Groups and its members. Select any group in the table and do a “Control+A” in order to select them all, then a “Control+C” to copy it and a “Control+V” to paste them Inside of a new Excel document.
There we have it! A list of all Security Groups (with its members) neatly arranged in an Excel file.
Now take the time to analyze maybe rearrange the existing groups. Remember that when it comes to complication, less is more, often. By inserting groups inside of groups and giving permissions to groups instead of to users we can keep it simple, as we should.
I hope this will be useful, when needed.
Have a nice and productive day!
With kind regards,
Hélio de Andrade