Get Office 365 Admin Roles using PowerShell

Office 365 has a couple of admin roles which can be assigned to different users. With the below PowerShell one-liner you can get the Office 365 Admin Roles in 1 overview.

Get-MsolRole | %{$role = $_.name; Get-MsolRoleMember -RoleObjectId $_.objectid} | select @{Name="Role"; Expression = {$role}}, DisplayName, EmailAddress

You’ll first need to connect to the Office 365 tenant using “Connect-MsolService” and then enter the above one-liner

image

Leave a Reply

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