Repository navigation
What is the reasoning for not including the organization name in the artifacts? #50001
Unanswered
nrail-joerg-walter
asked this question in
Q&A
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am getting tokens and user infos with the organization alias and its uuid - but not with the full organization name.
What is the reasoning for that?
All reactions
Replies: 1 comment
Uh oh!
There was an error while loading. Please reload this page.
The design decision to use the alias (not the full name) in tokens and UserInfo comes down to two things: stability and URL-safety.
Why alias and not name:
To include the organization name in your tokens:
You can add a custom Organization Protocol Mapper or a script mapper that reads the organization attributes. In Keycloak 25+, the organization claims are available on the token, and you can configure additional mappers to include the
namefield alongside thealias.Alternatively, if the organization name is needed in your application, the recommended pattern is to resolve it from the
aliasor UUID at login time via the Organization API (GET /realms/{realm}/orgs/{orgId}) and cache it on the application side.All reactions