Need to Access User Information from Auth0 database after successful authentication


I am implementing google assistant integration with salesforce via node js. I have done the following steps:-

  1. Configured Account linking in Google assistant side.
  2. Able to successfully authenticate users using salesforce credentials via auth0 and users are getting redirected as well after successful login.

Now I want to fetch the information which have been entered by the user in the authorize page in my node js. Is there any way by which I can access this information from the auth0 database?

Need help on this and appreciate if someone can help me in achieving this.

Hello @debarunsengupta2512,

You probably want to use a rule to add the attributes you are interested in to the ID token. You might also be interested in using the Management API directly or via one of the available SDKs such as node-auth0.

do you have any sample code which I can refer to get the user info after successful authentication in node js

If you are adding a profile attribute to the ID token, you can use the following as a template:

Given an attribute my_attribute in the user’s app_metadata, add my_attribute to the ID token:

function (user, context, callback) {
  // Adds my_attribute to the idToken
  user.app_metadata = user.app_metadata || {};
  user.app_metadata.my_attribute = user.app_metadata.my_attribute || "";
  context.idToken[""] = user.app_metadata.my_attribute;
  callback(null, user, context);

thanks for your prompt response…is there a way I can connect with you via hangout to discuss further on this…got stuck in one area and need help badly to discuss further on the issue.

I’m afraid its past midnight where I am and I am headed to bed. Feel free to leave details here and I’ll have a look in the morning.

my email id is

you can drop me a request here for hangout discussion.

We can have a call in your morning time as well if it works for you… Please let me know which time works for you.

Are you there now to discuss??

Hello @debarunsengupta2512. Apologies for the late reply. I don’t want to mislead you … while I try to help out in the forums as much as I can, I don’t work for Auth0. You might want to try contacting Auth0 support if you don’t resolve your issue in the forums.

I just want to show piece of code and would like to have ur input to fetch the details after successful auth0 authentication…will that be fine fr u??

Hello @debarunsengupta2512,

Apologies again for delay. I would be willing to try helping you out, though I should mention I am not a developer and my knowledge of node/javascript is limited (though I am learning!) I’m in the Eastern timezone and could do a video call this evening.