79757499

Date: 2025-09-06 11:02:10
Score: 1
Natty:
Report link

Currently, you're using a Hardcoded Attribute Mapper in Keycloak. This mapper does not extract dynamic values (such as the user ID) from the identity provider token. Instead, it assigns predefined static values to user attributes after a successful login.

For example, if you configure a Hardcoded Attribute Mapper for the email attribute with the value [email protected], then after a user logs in via an identity provider like Twitter, the user's email attribute will be set to [email protected].

If you want to map the user ID or other token claims dynamically, you should use a "User Attribute Importer", "Claim to User Attribute", or "Attribute Importer" mapper — not the Hardcoded one. I am not sure if those mapper are available in the keycloak 26.x.x version and keycloak provide an options to create a own custom SPI.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ganesh Karunanidhi