Repository navigation
Keycloak 26.6 - How to configure realm roles using new feature Organization Groups? #48061
Replies: 1 comment
|
Short version: on 26.6.x this isn't possible. From 26.7.0 it is, through the Organization API. On 26.6.x it's a missing feature, not a decision about roles:
26.7.0 added it (issue #47327, PR #48670, release notes: "Automatic role inheritance through organization groups"). Role mappings now live under the Organization API and accept realm and client roles: The body is the usual list of role representations ( Until you can upgrade: assign the roles directly to the users, or use a realm group or composite role. |
Uh oh!
There was an error while loading. Please reload this page.
Bug / Missing Feature: No API endpoint to assign role mappings to Organization Groups (introduced in 26.6.0)
Keycloak version: 26.6.0
Component: Organizations / Groups / Admin REST API / Admin UI
Description
Keycloak 26.6.0 introduced support for organization-specific group hierarchies, allowing each organization to manage its own isolated groups. However, there is no clear or documented way to assign role mappings to these organization groups — neither via the Admin REST API nor via the Admin UI.
Steps to Reproduce
Via Admin REST API
Actual Behavior
REST API: The following error is returned when calling the standard Groups role-mappings endpoint:
POST /admin/realms/{realm}/groups/{groupId}/role-mappings/realmHTTP 400 Bad Request
{ "errorMessage": "Cannot manage organization related group via non Organization API." }Questions
Was the decision to block the standard /groups/{id}/role-mappings endpoint for org groups deliberate, or is this something that was simply not yet implemented as part of the 26.6.0 scope?
For example, should it be possible to assign a realm-level role to an org group, or should only organization-specific roles be allowed? This has direct implications on the API path and the authorization model.
What is the recommended workaround in the meantime?
Once the intended approach is defined, is there a plan to expose role mapping for org groups in the Admin Console, similar to the Role Mapping tab available for regular realm groups?
All reactions