Raw ID token returning undefined

Moved from a private thread for visibility

I am having 2 applications under one tenant. I need to call an API of one application when I am authenticated to the other one. How can I get the access token of the former when I am logged into the latter. I need the JWT access token to get the data into the second applications dashboard. But the data can only be called by the other applications api which requires and access token.

I am facing one more issue. The user object that is available in useAuth0 hook is not getting updated with user parameters and is remaining as undefined even after successfully authenticating. Do I need to call any function after calling loginWithRedirect .

Why can’t you call the API directly with the access token you have? I’m not sure I understand the issue here fully.

This sounds like an async issue. Can you post the code you are using here?

I have two applications here, and I want to call thingsboard API(Which only works if I have the thingsboard accesstoken which we get after authenticating) when I am in Davas. Basically to fetch some data into davas.

Case 2:

Sorry for the delayed response.

Are you not requesting an access token for the thingsboard API from the davas app? You should have the thingsboard API identifier as the audience in the request from davas.