Good day, this time I was asked to retrieve who the Company Administrators and SharePoint Service Administrators are from customer tenant. The following is the steps I’ve used to deliver the requested Info:
- I downloaded the Microsoft Online Service Sign-In Assistant from the following URL https://go.microsoft.com/fwlink/p/?LinkId=286152, proceeded to install
- Install the Azure Active Directory for Windows PowerShell Module, as an Administrator loaded the PowerShell console and executed the Install-Module MSOnline command, specified yes, “Y” two times, first for NuGet and then for Untrusted Repository
- Inside the PowerShell session, executed the following PowerShell commands:
- Import-Module MSOnline
- Connect-MsolService this command loaded an authentication window, you need to provide credentials
- Get-MsolRole, this command will list all the Office 365 roles, make sure you identify the one you need and copy the Object ID value
- Get-MsolRoleMember -RoleObjectId “rol ID” this command will display who the members of the role are
Reference:
https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell