
Export all Admin Roles and members from Azure AD
Hello everyone,
I share with you this PowerShell script that allows you to list all the groups of Azure AD roles as well as theirs members.
Source code
1. Param(
2. [Parameter(Mandatory = $true)]
3. [string]$TenantName
4. )
5. Connect-AzureAD
6. $mycoll = @()
7. $role = Get-AzureADDirectoryRole
8. foreach ($r in $role)