Reputation: 454
I'd like to retrieve a list of users from an Azure AD App role by means of the Azure CLI.
I am able to fetch some of my application's metadata by issuing
az ad app list --app-id <app-id>
. The resulting JSON does include the appRole
for which I want to fetch all assigned users.
From the az ad app
docs I only understand that App roles can be used in conjunction with az ad app create
or az ad app update
, but this is not what I am looking for.
I also tried az ad group member list --group <group-id>
but this command apparently only applies to AAD groups, not to App roles.
How can I simply retrieve a list of users assigned to a certain App role?
Upvotes: 2
Views: 2735
Reputation: 1063
Unfortunately, we don’t have any CLI command to get the assignment list for an app role. Because the app role is something which belongs to tenant, and we don’t have tenant parameter for the command az role assignment list. Below is the official doc for your information.
We have only one way to fetch the assignment role list is through portal.
Upvotes: 2