# Managing scope field of Access Token

**URL:** <https://forum.keycloak.org/t/managing-scope-field-of-access-token/1265>\
**Category:** Getting advice\
**Created:** [February 14, 2020, 2:05pm UTC](https://forum.keycloak.org/t/managing-scope-field-of-access-token/1265 "2020-02-14T14:05:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daloulou](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/daloulou/32/411_2.png) [@daloulou](https://forum.keycloak.org/u/daloulou)\
**Post date:** [February 14, 2020, 2:05pm UTC](https://forum.keycloak.org/t/managing-scope-field-of-access-token/1265/1 "2020-02-14T14:05:38Z")

</div>

Hi,

I have a Keycloak connected to an LDAP, in wich i have several groups and subgroups for example :

- orders
  - read
  - write

I want it to appear in the scope field of genereated access token.  
How can I do that.

Thanks !

Dan

---

<div class="post-metadata">

**Author:** ![Robinyo](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Robinyo](https://forum.keycloak.org/u/Robinyo)\
**Post date:** [February 14, 2020, 7:49pm UTC](https://forum.keycloak.org/t/managing-scope-field-of-access-token/1265/2 "2020-02-14T19:49:29Z")

</div>

See:

- [Server Administration - Script Mapper](https://www.keycloak.org/docs/latest/server_admin/index.html#script-mapper)
- [Server Developer - JavaScript Providers](https://www.keycloak.org/docs/latest/server_development/#_script_providers)
- [How to create a Script Mapper in Keycloak?](https://stackoverflow.com/questions/52518298/how-to-create-a-script-mapper-in-keycloak)
