@H Raja
Thank you for your post and I apologize for such a delayed response!
When it comes to generating/ getting a report via PowerShell on all your Management Groups, and Subscriptions, with all Role Assignment details, you should be able to do this via the Get-AzRoleAssignment command. The Az PowerShell command lists Azure RBAC role assignments at the specified scope, and by default it lists all role assignments in the selected Azure subscription.
When I tested Get-AzRoleAssignment
within my Azure AD Tenant, I received the RBAC roles from my Management Group all the way to Resources.
#Connect to Azure via PowerShell
Connect-AzAccount
#Execute the Get-AzRoleAssignment Command
$getrRoleAssignments = Get-AzRoleAssignment
#Export Output into an Excel doc
$getrRoleAssignment | export-csv -Path .\rbacROles.csv
#Management Group and Subscription AZ commands
Get-AzManagementGroup
Get-AzSubscription
Additional Links:
Get-AzManagementGroup
Get-AzSubscription
If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.
----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.