Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to assign multiple roles to a user or group in Azure AD?

When I add an appRoles section to my application manifest in Azure AD, I can assign users and groups to roles in the management portal.

  "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"
    }
  ],

However, the UI only allows me to assign a single role to a user or group.

I can't find how to assign multiple roles to a user or group. I can add the user to multiple groups and assign roles to members of that group, which will result in multiple role claims in the token for that user, but this seems awkward.

Am I missing something? Is there a way to assign multiple roles to a user or group?

like image 924
MvdD Avatar asked Oct 20 '15 17:10

MvdD


People also ask

Can they assign multiple Azure roles to a user defined in Azure AD?

This turns out to be a limitation of the Azure management portal. In this blog comment, the AAD PM explains it is possible to assign multiple roles to a user or group through the GraphAPI. For more info, see section 'Assigning application roles' in this MSDN blog article.

How many Azure AD roles are there?

There are about 60 Azure Active Directory (Azure AD) built-in roles, which are roles with a fixed set of role permissions.


Video Answer


2 Answers

You can assign multiple roles to the same user in the same app, but it is very limited. Basically add the same user again and select a different role:

enter image description here

The mechanism is very cumbersome and will not scale. If you have AAD Premium Lvl 2, you can associate application roles with groups and a when you assign a user to that group, they will gain the roles automatically. The automatic assignment only works for Premium Lvl 2 though.

like image 63
BgRva Avatar answered Sep 18 '22 18:09

BgRva


This turns out to be a limitation of the Azure management portal. In this blog comment, the AAD PM explains it is possible to assign multiple roles to a user or group through the GraphAPI.

For more info, see section 'Assigning application roles' in this MSDN blog article.

like image 28
MvdD Avatar answered Sep 16 '22 18:09

MvdD