Office 365: Find All SharePoint Online Administrators using PowerShell

Requirement: Get All SharePoint Online Administrators of the Office 365 tenant.

How to Check If a User is SharePoint Online Administrator in Office 365?

To find if a user is SharePoint Online Administrator, do the following:

  1. Login to Office 365 Admin Center:
  2. Expand Users >> Active Users
  3. Use the Search and the user. Click on the user from the results grid, which opens user properties.
  4. On the user properties page, under “Roles”, You’ll find “SharePoint Administrator”
    get all sharepoint online administrators from office 365

While these steps are quite simple, it would be cumbersome to go to each user’s properties and check if he/she has SharePoint Administrator role, isn’t it?

PowerShell to Get a List of SharePoint Online Administrators

This PowerShell script lists all SharePoint Administrators from Office 365 tenant. Use Azure AD PowerShell module to execute this script.

#Connect to Azure AD

#Get SharePoint Online Administrators Role
$RoleID = (Get-MsolRole -RoleName "SharePoint Service Administrator").ObjectID

#Get All Users with SharePoint Admin Role 
Get-MsolRoleMember -RoleObjectId $RoleID | Format-table -AutoSize

This prompts for login and gets you all SharePoint Administrators of the tenant.

get sharepoint administrators in office 365 sharepoint online

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply