How do I retrieve user.identities?

Hi, everyone.

I am new to Auth0. I have one question in terms of the auth0 callback and getting user information.
Original I have one app that I can retrieve user.identities from the callback JWT token. Then I create another app and switch to that app to do the login. The identities attributes was not returned from JWT token. Am I missing some configuration?

Thanks,

Hi @neteric

Are you adding identities to the ID token with a rule or action? Make sure that rule/action also fires for the other app.

John

1 Like

HI, John:

Thanks for the quick response. Let me explain the problem I encounter.

I am able to get identities form the JWT payload Profile Json Object in one of my app.

Profile {
displayName: ‘elin@xxx.xxx.com’,
id: ‘auth0|675’,
user_id: ‘auth0|675’,
name: { familyName: undefined, givenName: undefined },
emails: [ { value: ‘elin@xxx.xxx.com’ } ],
identities: [ { user_id: ‘675’,
provider: ‘auth0’,
connection: ‘xxx-Develop’,
isSocial: false } ]
}

Then I create another app in the same tenant and use the same database connection. The identities attribute is missing from the JTW payload Profile Json Object. The scope I use is: openid profile mai.

Thanks,

Hi @neteric

This looks very strange to me, I am not understanding something.

Can you post the whole ID Token?

Thanks

John

1 Like

Hi, @john.gateley

The following part is the id token from original app which I can get the identities.

``
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik4wVkVNa0kxTkVKRlJUZENRekU1T0RJNU1qVkVNVVExT0RZMVJrSXpPVGN3T0VFeVJqUXhOQSJ9.eyJjbGllbnRfbmFtZSI6IlF1aWQiLCJjb25maXJtZWRfYXQiOjE2MzQyNjIxMDQsImVtYWlsIjoiZWxpbkBuZXRiYXNlLmNvbSIsImxpY2Vuc2VfdHlwZSI6InF1aWQiLCJuYW1lIjoiZWxpbkBuZXRiYXNlLmNvbSIsIm5pY2tuYW1lIjoiRXJpYyBMaW4iLCJwYXNzd29yZF9jaGFuZ2VkX2F0IjoxNjM0MjYyMTA1LCJwaWN0dXJlIjoiaHR0cHM6Ly9zLmdyYXZhdGFyLmNvbS9hdmF0YXIvMDM4Y2QyYTg2MWY0ZjU3YTMzYWFiYjQxNDQ2MDQyYTc_cz00ODAmcj1wZyZkPWh0dHBzJ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ZDu1DMzTZdounC-J-wmGq7MIqiPgcDsQGSCfuIFFjH7D5mZkuctTJTpF-B9BZvDS4cVVhSsAALzU9XbcLTT3nt_teUVPLUmnko4KgKmTxQbTK_HFLyus5PgG8-T40hIkBUPY1G644qBhXVObVHQUaklYbW-H7KCGICJHU7aCsflUdgV4NkFn_n4a–XB2AJCLJZkmLHKZjR6xmiDUQJwCMCYoo1I4yZFxOX_lNdUAwdcvwWieOix5ccjFZHR4Yj2Doqzb3kF6V0YhmQv_ZxGuH0B-tFc2BaJkUjqEaCzMB_cz8UgFaw


Thanks,

Hi @neteric

The first token is an ID token, the second token is an access token.
It is not an ID token, and if you want the fields added to it, you’ll have to change your rules/actions.

John

2 Likes