Microsoft Azure 中角色分配和 appRoleAssignments 的区别

Difference between Role Assignments and appRoleAssignments in Microsoft Azure

Microsoft Azure 中的角色分配和 appRoleAssignments 有什么区别?

https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-list-rest

https://docs.microsoft.com/en-us/graph/api/serviceprincipal-list-approleassignments?view=graph-rest-1.0&tabs=http

主要区别在于 Role Assignments 是 Azure 订阅,而 App Role Assignments 是 Microsoft Graph API。

您使用 Role Assignments 将 Azure AD 中的用户访问权限分配给 Azure 订阅中的各种资源。根据分配的角色,用户能够针对 Azure 订阅中的 Azure 资源执行活动。

App Role Assignments 实际上是将 Azure AD 中用户的访问权限分配给您为 Azure AD 应用程序创建的自定义角色。这些角色本质上是特定于您的应用程序的自定义角色(例如管理员、用户等),并在您的应用程序代码中用于限制对应用程序各个部分的访问,例如具有“管理员”应用角色的用户可以访问管理屏幕,而具有“用户”应用角色的用户则不能。