# How can i fetch more user data on GET /userinfo

**URL:** <https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [November 17, 2021, 8:09pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340 "2021-11-17T20:09:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BaikovOD](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/baikovod/32/12898_2.png) [@BaikovOD](https://community.auth0.com/u/BaikovOD)\
**Post date:** [November 17, 2021, 8:09pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340/1 "2021-11-17T20:09:00Z")

</div>

Hello everyone.  
I’m trying to get user info with the access token via GET /userinfo  
But i’m only given the info provided by `openid email profile` scope.  
Can i get additional user info (like metadata and etc.) without using Management API?

---

<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:** [December 2, 2021, 10:54pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340/4 "2021-12-02T22:54:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 6, 2024, 7:43pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340/5 "2024-11-06T19:43:03Z")

</div>



---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 6, 2024, 7:43pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340/6 "2024-11-06T19:43:34Z")

</div>

Hi @BaikovOD

You are on the right track in trying to avoid Management API requests for regular authentication flows (as the rate limits for Management API are much stricter than limits for the Authentication API).

The best option would be to add any required information as a custom claim, either in the access token or in the ID token (depending on your needs).

E.g.

```js
exports.onExecutePostLogin = async (event, api) => {
  // adds a custom claim only if the user has app_metadata.favorite_color
  const favoriteColor = event.user.app_metadata["favorite_color"];
  if (favoriteColor) {
    api.idToken.setCustomClaim("favorite_color", favoriteColor);
  }  
};

```

You can add additional logic to the action, for example only add the claim for a specific application (by checking the `event.client.client_id` or `event.client.name`).

More information at [Create Custom Claims](https://auth0.com/docs/secure/tokens/json-web-tokens/create-custom-claims)

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 6, 2024, 7:44pm UTC](https://community.auth0.com/t/how-can-i-fetch-more-user-data-on-get-userinfo/73340/7 "2024-11-06T19:44:13Z")

</div>


