List of all users with elevated privileges

%3CLINGO-SUB%20id%3D%22lingo-sub-205319%22%20slang%3D%22en-US%22%3EList%20of%20all%20users%20with%20elevated%20privileges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-205319%22%20slang%3D%22en-US%22%3E%3CP%3EI'd%20like%20to%20get%20a%20list%20of%20all%20users%20with%20elevated%20privileges%20in%20Office%20365.%26nbsp%3B%20Is%20there%20a%20PowerShell%20command%20that%20would%20provide%20this%3F%26nbsp%3B%20Or%20what%20is%20the%20best%20way%20to%20obtain%20such%20a%20list%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-205336%22%20slang%3D%22en-US%22%3ERe%3A%20List%20of%20all%20users%20with%20elevated%20privileges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-205336%22%20slang%3D%22en-US%22%3E%3CP%3EBoth%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-205327%22%20slang%3D%22en-US%22%3ERe%3A%20List%20of%20all%20users%20with%20elevated%20privileges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-205327%22%20slang%3D%22en-US%22%3E%3CP%3EDefine%20%22Office%20365%22%3F%20%3A)Do%20you%20want%20a%20list%20of%20permissions%20as%20seen%20in%20the%20O365%20Admin%20center%20only%2C%20or%20do%20you%20want%20to%20check%20on%20any%20app-specific%20permissions%20(Exchange%20roles%2C%20SfB%20roles%2C%20SPO%20SC%20admins%2C%20etc)%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20the%20former%2C%20you%20can%20use%20PowerShell%20to%20generate%20a%20report.%20Get-MsolRole%20will%20give%20you%20a%20list%20of%20all%20the%20admin%20roles%2C%20and%20Get-MsolRoleMember%20will%20give%20you%20a%20list%20of%20any%20users%20assigned%20given%20role.%20If%20you%20want%20to%20include%20scoped%20roles%20(AUs)%2C%20you%20can%20also%20add%20the%20info%20from%20Get-MsolScopedRoleMember.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20the%20latter%20scenario%2C%20there%20is%20no%20single%2C%20or%20simple%20solution.%20You%20will%20have%20to%20use%20the%20tools%20exposed%20by%20each%20workload%20and%20craft%20a%20report.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Contributor

I'd like to get a list of all users with elevated privileges in Office 365.  Is there a PowerShell command that would provide this?  Or what is the best way to obtain such a list?

2 Replies

Define "Office 365"? :) Do you want a list of permissions as seen in the O365 Admin center only, or do you want to check on any app-specific permissions (Exchange roles, SfB roles, SPO SC admins, etc)?

 

For the former, you can use PowerShell to generate a report. Get-MsolRole will give you a list of all the admin roles, and Get-MsolRoleMember will give you a list of any users assigned given role. If you want to include scoped roles (AUs), you can also add the info from Get-MsolScopedRoleMember.

 

For the latter scenario, there is no single, or simple solution. You will have to use the tools exposed by each workload and craft a report.

Both, thanks!