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?

If you’re a Microsoft 365 administrator, You may want to find all SharePoint Online Administrators in your organization at times. Perhaps you want to check if a specific user has a SharePoint Administrator role or for security auditing purposes to ensure the right people are granted access to manage SharePoint. This guide will show you two different ways to find all the SharePoint Online Administrators in Microsoft 365 quickly and easily. Let’s get started!

To find if a user is a 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 sharepoint administrators in microsoft 365

While these steps are simple, it would be cumbersome to go to each user’s properties and check if they have a SharePoint Administrator role, isn’t it?

PowerShell to Get a List of SharePoint Online Administrators

As a second method, Let me show you the PowerShell script to find all SharePoint Online administrators in your tenant. This PowerShell script lists all SharePoint Administrators from Office 365 environment. Use the 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 script prompts for login and gets you all SharePoint Administrators of the Microsoft 365 tenant.

get sharepoint administrators in office 365 sharepoint online

In conclusion, retrieving a list of all SharePoint Administrators in a Microsoft 365 tenant is a straightforward process using PowerShell. As a Microsoft 365 administrator, it is important to know who has been granted Site Administrator permissions within your tenant. With the steps explained in this article, you can retrieve all SharePoint Administrators from your tenant.

To add a SharePoint Online administrator, use: How to Add a SharePoint Online Administrator?

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *