api 以获取分配给 Azure AD 中特定自定义角色的用户列表 [英] api to get list of users assigned to a particular custom role in Azure AD

查看:66
本文介绍了api 以获取分配给 Azure AD 中特定自定义角色的用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个 api 来列出分配给 Azure AD 中特定自定义角色的用户,或者一个 api 来提供分配的角色,包括特定用户的内置角色和自定义角色.任何人都可以建议api.提前致谢

I need an api that list the users assigned to a particular custom role in Azure AD or an api that gives the assigned roles, both built-in roles and custom roles of a particular user. Can anyone suggest the api. Thanks in advance

推荐答案

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

From the below query, you will get roledefinitionid by giving object-id-of-principal(userID)

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

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

Once you receive the role definition id of a specific user you can fetch the role details(built-in and Custome role) by giving ID(roledefinitionid)

https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions/ID

这篇关于api 以获取分配给 Azure AD 中特定自定义角色的用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆