Username claim in Access token

215 views
Skip to first unread message

Amal Antony

unread,
Oct 26, 2022, 8:18:50 AM10/26/22
to Keycloak User
Hi,

I want to remove the username claim from the access token of Keycloak. I am using an IdP as well. If I am correct, the username is coming from the IdP's user info url. I have tried it by removing the ''profile'' client scope for my client. All the name related claims were removed from the token except the "username" claim in the token. Any method to remove this claim from the access token?

Regards, 
Amal Antony

Sada Shiv Dash

unread,
Oct 26, 2022, 2:25:21 PM10/26/22
to Amal Antony, Keycloak User
Hello Amal,

Usually, Token username should not be removed from token , but still business want then find out the protocol mapper which set the username and remove that username name .

Hope this helps.

Regards
Sada Shiv Dash

On 26-Oct-2022, at 5:48 PM, Amal Antony <amalan...@gmail.com> wrote:

Hi,

I want to remove the username claim from the access token of Keycloak. I am using an IdP as well. If I am correct, the username is coming from the IdP's user info url. I have tried it by removing the ''profile'' client scope for my client. All the name related claims were removed from the token except the "username" claim in the token. Any method to remove this claim from the access token?

Regards, 
Amal Antony

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/23d07fd7-2dbe-4db4-83d5-f699936fb908n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages