是否可以将多个角色分配给Azure AD中的用户或组?
问题描述:
当我在Azure AD的应用程序清单中添加appRoles
部分时,我可以将用户和组分配给管理门户中的角色。是否可以将多个角色分配给Azure AD中的用户或组?
"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"description": "Can read data.",
"displayName": "Data Reader",
"id": "67fba7fa-e54e-4258-b95d-32b082eb771d",
"isEnabled": true,
"value": "reader"
},
{
"allowedMemberTypes": [
"User"
],
"description": "Can create and edit data.",
"displayName": "Data Writer",
"id": "e36736c5-e923-435e-8e44-6cae90792931",
"isEnabled": true,
"value": "writer"
}
],
但是UI只允许我分配给用户或组一个角色。我找不到如何为用户或组分配多个角色。我可以将用户添加到多个组,并将角色分配给该组的成员,这将导致该用户令牌中的多个角色声明,但这看起来很尴尬。
我错过了什么吗?有没有办法将多个角色分配给用户或组?
答
这原来是Azure management portal的限制。在此blog comment中,AAD PM解释了可以通过GraphAPI为用户或组分配多个角色。
欲了解更多信息,请参阅'分配应用程序角色'在此MSDN blog article。