# Scopes based on user role

**URL:** <https://forum.keycloak.org/t/scopes-based-on-user-role/5607>\
**Category:** Getting advice\
**Tags:** oidc\
**Created:** [October 27, 2020, 12:09am UTC](https://forum.keycloak.org/t/scopes-based-on-user-role/5607 "2020-10-27T00:09:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffellin](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jeffellin](https://forum.keycloak.org/u/jeffellin)\
**Post date:** [October 27, 2020, 12:09am UTC](https://forum.keycloak.org/t/scopes-based-on-user-role/5607/1 "2020-10-27T00:09:46Z")

</div>

I am building an app that will allow users access to do different things based on their role, ( admin vs user), The app consumes a jwt token , my plan was to use scopes, but I can’t figure out the steps to get Keycloak to generate the correct “scopes” based on the users role. Can anyone point me in the right direction here?

I see that I can also use the application -\> roles section of the jwt directly, but my understanding is that is a Keycloak specific element and not something I may see if I switch IDPs.
