marcino239
marcino239

Reputation: 33

Microsoft Graph API: Getting the users who are assigned to an Enterprise application

Is there a way to pull list of Users for a given Enterprise Application from MS Graph? I can see that Azure portal is making this query:

https://main.iam.ad.ext.azure.com/api/ManagedApplications/{enterprise-app-id}/AppRoleAssignments

Thanks!

Upvotes: 0

Views: 2961

Answers (1)

Carl Zhao
Carl Zhao

Reputation: 9511

According to the document:

If the resource service principal is an application that has app roles granted to users and groups, this will return all the users and groups assigned app roles for this application.

You can use this api to list all users or groups assigned to the enterprise application:

https://graph.microsoft.com/beta/servicePrincipals/{id}/appRoleAssignedTo

You need to replace {id} with Object ID.

enter image description here

Upvotes: 6

Related Questions