# Getting Realm Role Attributes with the client scope

**URL:** https://forum.keycloak.org/t/getting-realm-role-attributes-with-the-client-scope/29261
**Category:** Getting advice
**Tags:** admin-console, authentication, oidc
**Created:** [December 17, 2024, 2:50pm UTC](https://forum.keycloak.org/t/getting-realm-role-attributes-with-the-client-scope/29261 "2024-12-17T14:50:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sakitha](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sakitha](https://forum.keycloak.org/u/sakitha)
#### Post date: [December 17, 2024, 2:50pm UTC](https://forum.keycloak.org/t/getting-realm-role-attributes-with-the-client-scope/29261/1 "2024-12-17T14:50:33Z")

</div>

Hi guys,  
I am finding a way that i can retrieve the user assigned realm role’s predefined attributes when the user logged in.  
currently role name is retrieving by adding ‘roles’ client scope to my client.but i cannot get that role attributes with the response.  
Is there a way i can do this.?

---

<div class="post-metadata">

### Author: ![FlorianS](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/florians/32/11432_2.png) [@FlorianS](https://forum.keycloak.org/u/FlorianS)
#### Post date: [January 13, 2025, 12:06am UTC](https://forum.keycloak.org/t/getting-realm-role-attributes-with-the-client-scope/29261/2 "2025-01-13T00:06:10Z")

</div>

Hi Saskitha,

did you try to add a “User Attribute Mapper” to your token and provide the key your looking for?  
If this doesn’t work, you could always develop a custom extension.

Out of curiosity: What’s your business case for this inquiry?

Best regards,  
Florian
