dovregubben
dovregubben

Reputation: 454

Retrieve App role assignments using Azure CLI

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

Answers (1)

Sourav
Sourav

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.

https://learn.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-list

We have only one way to fetch the assignment role list is through portal. enter image description here

Upvotes: 2

Related Questions