Microsoft Graph列表由resourceScope提供RBACRoleAssignments

时间:2018-04-23 08:04:55

标签: azure-active-directory microsoft-graph azure-rbac

我想用GraphAPI列出一个组的roleAssignments。 但我只看到API列出整个角色分配 我尝试使用resourceScopes/scopeMembers条款按$filter进行过滤,但它不起作用。

我应该自己过滤整个列表,还是有其他方法可以做到这一点?

1 个答案:

答案 0 :(得分:2)

您好像正在寻找Azure RBAC角色分配。

这些与您链接的内容不同,后者是Intune设备管理角色分配(特定于Intune RBAC roles)。它们也不同于Azure AD app role assignments(用于将应用程序或用户/组分配给另一个应用程序的角色)和Azure AD目录角色成员资格(用于将用户分配给目录角色)。

您可以使用Azure Management API list all Azure RBAC role assignments。您还可以按范围和/或角色分配所针对的用户,组或应用过滤此请求。

例如,要列出已为订阅{group-id}分配了一个组{sub-id}的所有范围:

GET https://management.azure.com/subscriptions/{sub-id}/providers/Microsoft.Authorization/roleAssignments?api-version=2015-07-01&$filter=principalId%20eq%20'{group-id}'

有关详细信息,请参阅Manage Role-Based Access Control with the REST API