# Anyway to include user groups into my jwt token

**URL:** <https://forum.keycloak.org/t/anyway-to-include-user-groups-into-my-jwt-token/8715>\
**Category:** Getting advice\
**Created:** [April 25, 2021, 9:43am UTC](https://forum.keycloak.org/t/anyway-to-include-user-groups-into-my-jwt-token/8715 "2021-04-25T09:43:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mqorom](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mqorom](https://forum.keycloak.org/u/mqorom)\
**Post date:** [April 25, 2021, 9:43am UTC](https://forum.keycloak.org/t/anyway-to-include-user-groups-into-my-jwt-token/8715/1 "2021-04-25T09:43:05Z")

</div>

Hi,

I have two user groups in my kc server ( adminGroup, userGroup)  
Is there any possible way to include user group into jwt token.

Below is the group defined in my server

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

---

<div class="post-metadata">

**Author:** ![Cyben](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/cyben/32/2547_2.png) [@Cyben](https://forum.keycloak.org/u/Cyben)\
**Post date:** [April 25, 2021, 7:53pm UTC](https://forum.keycloak.org/t/anyway-to-include-user-groups-into-my-jwt-token/8715/2 "2021-04-25T19:53:17Z")

</div>

You have to add a mapper for the clients you need the groups.  
There is a built in group mapper.

If you need the groups in all clients, make a client scope and add it to the default ones

---

<div class="post-metadata">

**Author:** ![mqorom](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mqorom](https://forum.keycloak.org/u/mqorom)\
**Post date:** [April 28, 2021, 10:52am UTC](https://forum.keycloak.org/t/anyway-to-include-user-groups-into-my-jwt-token/8715/3 "2021-04-28T10:52:26Z")

</div>

thank you for the answer. It helped a lot Below is the solution for my case.

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/4/45898d90260193e54cfd22df979910eea684c009.jpeg)
