I have Azure AD authentication configured through a Microsoft Azure AD Enterprise Connection.
This is working well and I would like to add the users’ Azure AD tenantid property as a custom claim.
The Raw JSON for a user that was registered through this connection lists a tenantid property which contains the Azure AD tenant id. Querying the user through the Management API also provides this value. Within a Custom Action, event.user.tenantid says that the property does not exist, and @ts-ignore results in no value being returned.
Is this possibly related to the last item on Actions Limitations? “Top-level event.user attributes added by an external IdP or custom database script”. There is no indication on the user record that this is a non-standard attribute, but it not being listed in any documentation would seem to indicate this.
It looks like this same question was asked in Nov '21 (How to access the `tenantid` property on a `User` in an Auth0 action) and the response at the time was to continue using Rules (as the poster had this working in a Rule).
Being new to Auth0, I would rather not start off by using Rules if there are plans to deprecate them, but if that is far enough into the future then perhaps it is the way to go.
Can someone please provide guidance here?