I cannot figure out how to get the upn in an action.
It is really important because sometimes I have noticed that email is missing for some users and then I need to use upn instead.
So the answer to this is to use the management api, yet Auth0 advocates against using the management API in actions. The following is from auth0’s migrate from rules to actions document.
In general, we do not recommend calling the Management API from a high-traffic, critical path like Rules or Actions. Requests to all Auth0 APIs are rate limited, including calls from extensibility points, and calling an API for all logins could easily result in failed logins at high-traffic times
Why isn’t the users upn available on the user object like it was in rules? Why wasn’t this listed in as a limitation in the actions limitations doc? Actions Limitations
Will making management api calls in actions go against our M2M token auth quota?
Upon further investigation it looks like upn is now available on event.user? I tested by logging the users upn in a test action and it seems to be available, the types just need to be updated in the action editor, so good news!
Confirmation that this value is available and safe to use would be appreciated. Thanks
We’ve updated our Knowledge Solutions with a chapter about Adding Claims with Action in a similar fashion to how Rules worked. You can find it here → Azure AD Integration not Providing the User Email