# User Realm Role in OIDC userinfo endpoint

**URL:** <https://forum.keycloak.org/t/user-realm-role-in-oidc-userinfo-endpoint/11822>\
**Category:** Configuring the server\
**Tags:** client-configuration, oidc\
**Created:** [November 1, 2021, 7:23am UTC](https://forum.keycloak.org/t/user-realm-role-in-oidc-userinfo-endpoint/11822 "2021-11-01T07:23:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![menashetikal](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@menashetikal](https://forum.keycloak.org/u/menashetikal)\
**Post date:** [November 1, 2021, 7:23am UTC](https://forum.keycloak.org/t/user-realm-role-in-oidc-userinfo-endpoint/11822/1 "2021-11-01T07:23:15Z")

</div>

Hi,  
I’m using Keycloak 14.0.0 and had some issues with the roles mapper  
It sims that the Roles mapper does not take effect on the “userinfo” endpoint

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/7/7a9b23eb21378fa9fd182fef2058ff2ad91f8957.png)

```auto
{
  "sub": "XXXXXXXXXXXXXXXXXXXXXXXX",
  "email_verified": true,
  "name": "foo bar",
  "preferred_username": "e",
  "roles": [
    "SuperAdmin"
  ],
  "email": "e@example.com"
}

```

On the access token, it does work  
What can be the issue?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![l10178](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/l10178/32/2422_2.png) [@l10178](https://forum.keycloak.org/u/l10178)\
**Post date:** [November 1, 2021, 1:29pm UTC](https://forum.keycloak.org/t/user-realm-role-in-oidc-userinfo-endpoint/11822/2 "2021-11-01T13:29:16Z")

</div>

![Screen Shot 2021-11-01 at 21.27.15](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/a/a000ec73656bd8d83411a0e4d9fa9a88276bc4e2.png)

---

<div class="post-metadata">

**Author:** ![menashetikal](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@menashetikal](https://forum.keycloak.org/u/menashetikal)\
**Post date:** [November 2, 2021, 7:03am UTC](https://forum.keycloak.org/t/user-realm-role-in-oidc-userinfo-endpoint/11822/3 "2021-11-02T07:03:19Z")

</div>

Hi, @l10178. Thank you for your answer.  
We did it in the User Realm Roles, and it showed in the userinfo  
The point is that role mapping does not work. meaning that the userinfo view the real role name and not the alias
