Reputation: 43
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://learn.microsoft.com/en-us/graph/api/user-list-approleassignments?view=graph-rest-1.0&tabs=http
#HTTP request
GET /users/{id | userPrincipalName}/appRoleAssignments
Upvotes: 3
Views: 1893
Reputation: 9559
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}
Upvotes: 4