/userinfo endpoint does not contain custom claim

Or how can i test the /userinfo endpoint to see if my data is complete. I have added a custom claim in login flow adding api.idToken.setCustomClaim(‘test’, ‘test’). I seem to be not able to map this field to a platform where i use Auth0 SSO as auth provider and want to use the custom claims. The platform calls the /userinfo endpoint. I was wondering how can i debug this i tried to use the bearer token against /userinfo i got from M2M https://xxx/oauth/token POST call but its always unauthorized. I also checked the logs = monitoring for any trace of the /userinfo call. all to no avail - please help

Hey there @admin76!

The access token that is used to called /userinfo needs to be that of the user themself, not from an M2M application.

Dont know where the comment went but i was able to get it working adding custom claims in login flow and using onExecuteCredentialsExchange hook. Thank you!

1 Like