azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Do we have an option to get all role assignements for app registration?

Open johnakash opened this issue 6 years ago • 3 comments

Resource Provider

Description of Feature or Work Requested We are looking to export data of the role assignments on all app registrations in our tenant. Microsoft support team shared - https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadserviceapproleassignment?view=azureadps-2.0 as the powershell command and I am looking for the equivalent in AZ CLI.

Minimum API Version Required az --version azure-cli 2.11.1 core 2.11.1 telemetry 1.0.5 * ]

johnakash avatar Sep 08 '20 15:09 johnakash

add to S176

yonzhan avatar Sep 08 '20 15:09 yonzhan

@yonzhan Is this already existing or you guys are planing to release a feature for that? If it is so, could you please provide an ETA?

johnakash avatar Sep 09 '20 16:09 johnakash

appRoleAssignments API is for granting Application Permissions. az ad add permission doesn't support listing them.

You may try az rest to call Microsoft Graph API List appRoleAssignments granted to a service principal and see if you can get unblocked. Please see https://github.com/Azure/azure-cli/issues/12946 for how to use az rest with Microsoft Graph and https://github.com/Azure/azure-cli/issues/12137#issuecomment-596567479 for an explanation on appRoleAssignments.

jiasli avatar Sep 10 '20 03:09 jiasli