# Actions to customize /userinfo endpoint?

**URL:** <https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [October 3, 2024, 8:31pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544 "2024-10-03T20:31:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt31](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matt31/32/61077_2.png) [@matt31](https://community.auth0.com/u/matt31)\
**Post date:** [October 3, 2024, 8:31pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544/1 "2024-10-03T20:31:18Z")

</div>

Is there a code sample or documentation around how I can customize the userinfo endpoint response using an action? Our use case is we have an oauth based SSO integration that we want to allow admin users to log in as other users. Customizing the userinfo endpoint would make this pretty easy.

Appreciate the help!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [October 3, 2024, 9:38pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544/3 "2024-10-03T21:38:48Z")

</div>

Hi @matt31,

Welcome to the Auth0 Community!

Unfortunately, that is not possible because the `/userinfo` endpoint uses an opaque access token.

Only JWT access tokens can be customized with custom claims.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![matt31](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matt31/32/61077_2.png) [@matt31](https://community.auth0.com/u/matt31)\
**Post date:** [October 3, 2024, 9:42pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544/4 "2024-10-03T21:42:22Z")

</div>

Hey @rueben.tiow!

I meant the actual response returned by /userinfo. Is there any way to modify what is returned when called with the access token?

Thanks!

---

<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:** [October 17, 2024, 9:42pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544/5 "2024-10-17T21:42:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [October 22, 2024, 6:39pm UTC](https://community.auth0.com/t/actions-to-customize-userinfo-endpoint/148544/6 "2024-10-22T18:39:21Z")

</div>

Hi @matt31,

Thanks for your reply.

I have checked and tested this on my end. I need to make a correction to my initial reply. You can add custom claims to your ID Token. For more information, check out our knowledge article at [Adding custom claims to tokens](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590).

Thanks,  
Rueben
