Actions to customize /userinfo endpoint?

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!

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

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!

1 Like

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

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.

Thanks,
Rueben