Users can have different administrative roles in Azure Ad. Azure Portal can show these roles and members. Sometimes it can be favorable to get roles and members in a PowerShell object list.
To login into your Azure AD tenant use:
Where xxx is your tenant id. The -TenantId is optional. But if your account member of different Azure ADs you can select the right one.
After login in with your credential you can show the different roles with:
Using PSCustomObject helps to build a list/array of custom objects to save all roles and users.