Search code examples
azure-active-directoryazure-ad-b2cazure-ad-graph-apiidentity-experience-framework

In Azure AD B2C, How do i link a social account of a user with an already existing local account during first time sign in from social login?


As i understand from documentation, Azure AD B2C creates a new local account for every user that comes from a social login such as GMail/Facebook while signin first time (Correct me, if i'm wrong). However i want to intercept this and link the user to an already existing (user's own) local account without creating a new local account, through custom policies.


Solution

  • The Wingtip sample contains an example of this flow.

    See the "B2C_1A_link" relying party file and the "Link" user journey for reference.

    Note this user journey prompts the end user to log in with a local account before they log in with the social account.