api以获取分配给Azure AD中特定自定义角色的用户列表

问题描述 投票:0回答:1

我需要一个列出在Azure AD中分配给特定自定义角色的用户的api,或提供所分配角色(既是内置角色又是特定用户的自定义角色)的api。谁能建议api。在此先感谢

microsoft-graph
1个回答
0
投票

从下面的查询中,您将通过提供object-id-of-principal(userID)获得roledefinitionid

 https://graph.microsoft.com/beta/roleManagement/directory/roleAssignments?$filter=principalId eq '<object-id-of-principal>'

一旦收到特定用户的角色定义ID,您可以通过提供ID(roledefinitionid)来获取角色详细信息(内置角色和Custome角色)

https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions/ID
© www.soinside.com 2019 - 2024. All rights reserved.