Issue
When using Auth0 as an identity provider with SSO (such as Google or Facebook), duplicate user profiles may appear in Segment’s Identity Graph. This occurs when both the SSO provider ID (e.g., google-oauth2|...) and the Auth0 internal ID (e.g., auth0|...) are sent as userId values in identify or track calls, resulting in events and profiles being split across these IDs.
Product
Twilio Segment
Environment
Segment Console
Cause
Auth0 generates separate user IDs for SSO and internal authentication. If both IDs are sent to Segment before Auth0 completes its internal merge, Segment treats them as distinct users. This results in duplicate profiles and split event histories in both Segment and downstream tools like Braze.
Resolution
- Standardize on sending a single, canonical userId to Segment for each user to prevent profile duplication.
- To merge duplicate profiles in downstream tools like Braze, use an Alias call to explicitly link the SSO and Auth0 IDs. Alias calls are not processed by Unify.
- Review and update the signup flow to ensure only the intended userId is used in all subsequent identify and track calls.
Additional Information
Segment Unify does not support merging profiles with distinct userIds, even if other traits (such as email) match. The Alias call does not merge profiles within Segment Unify, but can be used for merging in destinations like Braze. For long-term resolution, ensure your application logic consistently uses a single userId after authentication.