How to get access to context data from the user details page

Hi,

Once a user has logged in, I see a context section on the details page. How do i access to data in the context section there?

Thanks,

Ivan

Hi @ivan,

Thanks for reaching out to the Auth0 Community!

I understand that you are looking to get the information from the Auth0 Dashboard > Logs > Context Data section.

To do so, you will need to use the Management API Search log events endpoint to look for successful login events (s log event type code).

And then use the Get a log event by id endpoint to get the context data for that log_id.

If you only need to get the user information, there is an option to call the Get a user endpoint as well.

Does that help?

Thanks,
Rueben

Hi @rueben.tiow ,

Thanks for the quick response. During the oaurh2 flow, there is the idtoken that is returned with the access token. I would like to get that idtoken token.

To be clear, it is in each user profile in the Users section, under the details section, context section which is part of the Identity Provider Attributes section.

Is this section accessible with the api calls you mentioned, or is there a way to return that context as week in the Fetch User Details script too?

Thanks

Hi @ivan,

Thank you for your response.

You can get the ID Token by specifying the openid scope in the /authorize request.

For example:

https://{yourDomain}/authorize?
    response_type=code&
    client_id={yourClientId}&
    redirect_uri={https://yourApp/callback}&
    scope=openid&
    state={state}

Yes, this information should be available by calling the Get a user endpoint.

Please let me know if you have any additional questions.

Thanks,
Rueben

Wonderful, thanks Reuben.

1 Like

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