dex icon indicating copy to clipboard operation
dex copied to clipboard

Support Azure AD roles claim

Open Fresa opened this issue 3 years ago • 4 comments

App registrations in Azure AD support custom application roles that are emitted as a roles claim in the id_token. https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-add-app-roles-in-azure-ad-apps

Is your feature request related to a problem?

Roles is a nice alternative or complement to groups as explained in the linked document from Microsoft. It also doesn't need any permissions that require global admin consent, like Directory.Read.All.

Describe the solution you'd like to see

I guess this would require a new custom claim in dex as it's not a standard claim?

Describe alternatives you've considered

N/A

Additional context

I added a comment in https://github.com/dexidp/dex/issues/1182 as well as another rational for custom claims mapping.

Fresa avatar May 05 '21 07:05 Fresa

The linked issue is slightly different in my opinion. We have similar claim mapping solutions in other providers. groups is a distinguished claim in Dex, so we can add it to the connector configuration similarly.

sagikazarmark avatar May 05 '21 11:05 sagikazarmark

This is also needed for any large organization because groups claim in Azure-returned JWT has a character limit, so if a person is member of too many, then they won't all fit to the token. The recommended solution to this is to use roles. Relevant doc

megakoresh avatar May 25 '21 16:05 megakoresh

@sagikazarmark Do you know how we can proceed with this?

PG2000 avatar May 24 '22 12:05 PG2000

Still open issue. Application Roles would be very useful. Groups can become unwieldy quick so using roles would be more "lean" for doing RBAC mapping vs groups.

cdenneen avatar Jan 22 '24 18:01 cdenneen