User_id from the Azure AD connection

Problem Statement

On an Azure AD connection, with the basic profile configured, what exactly is the user_id that comes across in the identities array? And what does Auth0 pull from Azure AD?

Solution

When using WAAD (Azure AD) connections with V2 and Basic Attributes, we use what’s sent in the ID TOKEN. The user_id will come from the sub-claim in the ID TOKEN from Azure.