# Question - Is it possible for Auth0 to fetch roles from OpenFGA and set it to access\_token once user login through Auth0

**URL:** <https://community.auth0.com/t/question-is-it-possible-for-auth0-to-fetch-roles-from-openfga-and-set-it-to-access-token-once-user-login-through-auth0/102930>\
**Category:** Get Help\
**Tags:** management-api, roles\
**Created:** [March 20, 2023, 11:15am UTC](https://community.auth0.com/t/question-is-it-possible-for-auth0-to-fetch-roles-from-openfga-and-set-it-to-access-token-once-user-login-through-auth0/102930 "2023-03-20T11:15:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adarsh.singh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@adarsh.singh](https://community.auth0.com/u/adarsh.singh)\
**Post date:** [March 20, 2023, 11:15am UTC](https://community.auth0.com/t/question-is-it-possible-for-auth0-to-fetch-roles-from-openfga-and-set-it-to-access-token-once-user-login-through-auth0/102930/1 "2023-03-20T11:15:46Z")

</div>

We wanted to add user roles to access\_token from OpenFGA once user login. Please let me know if it’s possible by using some configuration on Auth0 side ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 30, 2023, 10:56pm UTC](https://community.auth0.com/t/question-is-it-possible-for-auth0-to-fetch-roles-from-openfga-and-set-it-to-access-token-once-user-login-through-auth0/102930/4 "2023-03-30T22:56:54Z")

</div>

Hi there @adarsh.singh welcome to the community! I apologize for the delayed response here, but wanted to get back on this one regardless as it’s a great question.

There is no configuration on the Auth0 side that allows for adding FGA roles to access tokens - [FGA](https://openfga.dev/) really isn’t designed to enhance/enrich tokens at all, but rather an API to be called to know if a user has permission to execute a specific action _instead_ of relying on access token claims. The most obvious reason for this is to prevent access token bloat which can quickly become an issue with fine grained access control.

Hope this helps to clarify!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 25, 2023, 10:45pm UTC](https://community.auth0.com/t/question-is-it-possible-for-auth0-to-fetch-roles-from-openfga-and-set-it-to-access-token-once-user-login-through-auth0/102930/5 "2023-04-25T22:45:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
