<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">&nbsp;</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">Is it possible to return a user attribute in the ID token using protocol mappers?</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">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.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">&nbsp;</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">I created a protocol mapper. In that I set the protocol type as "User Attribute" and entered the key "accountId" as both the <span style="text-decoration: underline;">User Attribute</span> and <span style="text-decoration: underline;">Token Claim Name</span> and switched on both "Add to ID Token" and "Add to Access Token".</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">&nbsp;</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">I simply cant get this accountID attribute value returned in the ID Token nor Access Token.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">&nbsp;</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">Basically I need to return the user attributes in the ID Token / Access Token. Is it possible?</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">&nbsp;</p>
<!--WM_COMPOSE_SIGNATURE_START-->
<p class="MsoNormal" style="margin:0;padding:0;mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">Regards<strong>,</strong></p>
<p class="MsoNormal" style="margin:0;padding:0;mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">&nbsp;</p>
<p class="MsoNormal" style="margin:0;padding:0;mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">Kalinga</p>
<!--WM_COMPOSE_SIGNATURE_END--></font>