[keycloak-user] User attributes in ID Token using protocol mappers

Kalinga Dissanayake kalinga at leapset.com
Tue May 5 10:38:04 EDT 2015


 
Is it possible to return a user attribute in the ID token using protocol mappers?
I have a user that has a custom attribute called "accountId" and a value is assigned to it. I checked in the USER_ATTRIBUTE table (mysql) and the values are properly assigned.
 
I created a protocol mapper. In that I set the protocol type as "User Attribute" and entered the key "accountId" as both the User Attribute and Token Claim Name and switched on both "Add to ID Token" and "Add to Access Token".
 
I simply cant get this accountID attribute value returned in the ID Token nor Access Token.
 
Basically I need to return the user attributes in the ID Token / Access Token. Is it possible?
 
Regards,
 
Kalinga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150505/2397c2df/attachment.html 


More information about the keycloak-user mailing list