# Roles-claim from userinfo enpoint

**URL:** <https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703>\
**Category:** ShinyProxy\
**Created:** [January 24, 2024, 12:43pm UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703 "2024-01-24T12:43:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil0711](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/phil0711/32/928_2.png) [@phil0711](https://support.openanalytics.eu/u/phil0711)\
**Post date:** [January 24, 2024, 12:43pm UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703/1 "2024-01-24T12:43:44Z")

</div>

Hey,  
I’m trying to get the usergroup from the userinfo endpoint with openid auth.  
But unfourtantely it does not work . I can see this in the log: “No roles claim with name entitlement\_group found”  
When calling the userinfo-endpoint with Postman I can retrieve all needed information.  
Am I missing something in my config, any help is appreciated.

My application.yml:

```
proxy:
 title: MyApp
 landing-page: /
 heartbeat-rate: 10000
 heartbeat-timeout: 60000
 port: 6688
 authentication: openid
 openid:
   auth-url: https://my-url/as/authorization.oauth2
   token-url: https://my-url/as/token.oauth2
   jwks-url: https://my-url/pf/JWKS
   userinfo-url: https://my-url/idp/userinfo.openid
   client-id: hidden
   client-secret: hidden
   scopes: ["openid", "entitlement_group", "offline_access"]
   roles-claim: entitlement_group

logging:
  level:
    eu:
      openanalytics:
        containerproxy:
          auth: DEBUG
```

---

<div class="post-metadata">

**Author:** ![adanba](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/adanba/32/698_2.png) [@adanba](https://support.openanalytics.eu/u/adanba)\
**Post date:** [January 24, 2024, 3:23pm UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703/2 "2024-01-24T15:23:26Z")

</div>

Hey,

What framework do you use to do OpenID ?  
For example i’m using Keycloak, and i’m able to get user group.  
For that you have to go to client scopes \> client-dedicated \> add mapper by configuration \> choose group Membership \> give name “entitlement\_group” and Token Claim Name “entitlement\_group”

That’s it, hope this help  
ada

---

<div class="post-metadata">

**Author:** ![phil0711](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/phil0711/32/928_2.png) [@phil0711](https://support.openanalytics.eu/u/phil0711)\
**Post date:** [January 25, 2024, 7:49am UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703/3 "2024-01-25T07:49:45Z")

</div>

Hey @adanba,  
thanks for your answer.  
I already checked the userinfo-endpoint by calling it via Postman and the mentioned claim is already part in the answer.  
So my desired claim “entitlement\_group” is not available via the ID Token but only retrieveable at the userinfo endpoint.  
Thanks for your support

---

<div class="post-metadata">

**Author:** ![akkornel](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/akkornel/32/946_2.png) [@akkornel](https://support.openanalytics.eu/u/akkornel)\
**Post date:** [March 5, 2024, 11:58pm UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703/4 "2024-03-05T23:58:26Z")

</div>

Hello!

I ran into the same problem, and I think I found the code responsible: It looks like the containerproxy code only looks at the OIDC ID Token when it searches for the roles claim.

I reported this on the GitHub as issue [openanalytics/containerproxy#85](https://github.com/openanalytics/containerproxy/issues/85).

---

<div class="post-metadata">

**Author:** ![tdekoninck](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/tdekoninck/32/1079_2.png) [@tdekoninck](https://support.openanalytics.eu/u/tdekoninck)\
**Post date:** [March 11, 2024, 10:26am UTC](https://support.openanalytics.eu/t/roles-claim-from-userinfo-enpoint/2703/5 "2024-03-11T10:26:45Z")

</div>

Hi, thank you all for reporting this issue! I just implemented this and it will be included in the next release, which will be available soon.
