0
votes

I am using Microsoft Graph API to get AppRoles for user. Response contains AppRoleId and does not contain AppRoleName. Is there a way to achieve this?

Calling below Graph API request to get Roles defined for specific user through Postman. Apply Permission as per Microsoft document https://docs.microsoft.com/en-us/graph/api/user-list-approleassignments?view=graph-rest-1.0&tabs=http

#HTTP request 
GET /users/{id | userPrincipalName}/appRoleAssignments

enter image description here

1
DO NOT post images of code, data, error messages, etc. - copy or type the text into the question. How to AskRob

1 Answers

1
votes

According to the screenshot you provided, you have got the resourceId, then you only need to use the resourceId to get appRoles, and then find the corresponding appRoleName according to your appRoleId.

Get https://graph.microsoft.com/v1.0/servicePrincipals/{your resourceId}

enter image description here