Can’t source Idp Access Token from user identities array for OIDC Enterprise Connections.
There is no Access Token when retrieving the user object from API. The IdP Access Token is not present in the identities array.
user.identities.access_token is empty
Steps to reproduce
- Login with OIDC Enterprise Connection
- Make a GET request to Auth0 Management API
- Get response.data.identities.access_token
- Receiving an Empty array
Our custom OIDC enterprise connection doesn’t actually support IdP access tokens yet. We have a backlog item to track this issue.
As an alternative, you could use a custom social connection: Connect Apps to Generic OAuth2 Authorization Servers
The custom social connection can be configured almost exactly like a custom OIDC enterprise connection since they both use the same OIDC protocol. The only extra piece of work that is needed is setting up the “Fetch User Profile” script to populate/sync the Auth0 user profile when the user logs in.