Not able to get list of all users who have been assigned to a app role using graph api

MAQBOOL SHAIK 0 Reputation points

Title: How to retrieve a list of users assigned to a specific app role using Microsoft Graph API?

Question: I have an app that has Read and Write roles assigned to it. I'm looking for guidance on how to retrieve a list of all users assigned to the Write role using Microsoft Graph API. Can someone provide an example or guide me through the steps? Below is an image of the user interface for reference:

User's image

Thanks in advance!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,992 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,689 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 35,016 Reputation points


    You can retrieve a list of appRoleAssignment s for a user, group, or client service principal that have been granted for a given application service principal by calling the /appRoleAssignedTo graph API.

    GET /servicePrincipals/{id}/appRoleAssignedTo
    GET /servicePrincipals(appId='{appId}')/appRoleAssignedTo

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.