Paid Support: Guidance on Programmatically Migrating User from B2B to B2c with JUST federated account

Tim Anderson 145 Reputation points
2025-03-12T15:51:50.7833333+00:00

We are trying to move our users from azure b2b to b2c with no need to re-sign-up (very important). All our users are either members of our existing entra AD or federated through gmail, etc. We are having issues programmatically creating federated accounts in our b2c for users from externalAD -> we cannot locate their original issuerID in our entra, and the b2c graph api will not allow us to create new accts that only have federated identities and NO local acct.

We have exhausted documentation from the Azure help site, etc. Please don't just google and paste unless it is exactly this scenario with an answer.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Answer accepted by question author
  1. SrideviM 5,855 Reputation points Moderator
    2025-03-26T02:25:16.4866667+00:00

    Hello @Tim Anderson ,

    Thanks for your patience and for working through this with us.

    Instead of manually migrating external Entra ID users to B2C, you can allow them to sign in using their existing credentials. This avoids the need for re-signing up or setting a local password, which keeps the experience seamless.

    I followed this approach by configuring Microsoft Entra ID as an identity provider in a B2C tenant. Once that was set up, the sign-in page provided an option to log in with Microsoft Entra ID.

    Here’s how the sign-in option appeared on the login page:

    Sign-in option

    After selecting it, I was able to authenticate using an external Entra ID account:

    Entra ID sign-in

    Upon successful authentication, the user was automatically created in the B2C tenant:

    User created in B2C

    Once created, the user appeared in Azure AD B2C as expected:

    Azure AD B2C User Overview

    This approach enables Just-In-Time (JIT) user creation, meaning accounts are added dynamically when users sign in through the B2C flow in your app. There’s no need for a separate migration step.

    Hope this helps!


    If this answer was helpful, please click "Accept the answer" and mark Yes, as this can be beneficial to other community members.

    User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.