How to add a Azure AD User to Azure AD B2C Users list through Portal or Sign In User Flow

Mathew James 356 Reputation points
2022-08-08T09:30:56.107+00:00

All - Here is my Scenario:-

I have an SPA application which is Authenticated against

  1. Azure AD B2C Users and
  2. Azure AD Users Utilizing Custom IDP

I have also created User Flows (only the Sign In and not the Sign Up) .
I have also created all the B2C users through Portal and they are able to successfully login to the SPA application. So far so good.

Now the problem comes for the Azure AD Users. Since we only allow the Sign in User flow, those Azure AD users are not present in the Azure AD B2C Users list.
Hence, When the Azure AD users tries to Login (utilizing Custom IDP) and through Sign In User flow, it Says User Does not exist.

How can I add these Azure AD users to the Azure AD B2C Users list so that they can utilize Sign in User flow and login to our SPA application successfully.

Appreciate your help.

Thanks in Advance!
-Mathew James

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,716 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,147 questions
{count} vote

Accepted answer
  1. Marilee Turscak-MSFT 35,621 Reputation points Microsoft Employee
    2022-08-19T19:06:06.857+00:00

    Hi @MatthewJames5273,

    To allow the Azure AD users to authenticate with Azure AD B2C, you need to add Azure AD as a federated identity provider to your B2C user flow. This will allow users to login from other Azure AD tenants. There is a setup guide for this scenario here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-single-tenant?pivots=b2c-custom-policy

    For additional context, someone has asked a similar question on Stack Overflow.

    You cannot allow invited accounts to authenticate to B2C user flows or custom policies. (Ref: B2C flows)

    As you correctly mentioned, a sign-in flow policy cannot create accounts and that is why you are seeing that error.

    Let me know if this helps and if you run into questions with the setup guide.

    -

    If the information helped you, please Accept the answer. This will help us and other community members as well.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Mathew James 356 Reputation points
    2022-09-01T04:56:19.937+00:00

    Thanks for the detailed response and sorry for the delay in replying.

    I shall implement the same and will post more questions in case we face issues.

    Thank you!
    -Mathew James

    0 comments No comments

  2. Dhruvkumar Radadiya 0 Reputation points
    2023-01-27T16:32:29.0566667+00:00

    This method will add a separate button for a different tenant but is there any way to use the same login page for both tenants I have a custom sign-in page for B2C users and I want to use the same page for users in my organization's AD.

    0 comments No comments

  3. Dhruvkumar Radadiya 0 Reputation points
    2023-01-27T16:33:14.7533333+00:00

    This method will add a separate button for a different tenant but is there any way to use the same login page for both tenants I have a custom sign-in page for B2C users and I want to use the same page for users in my organization's AD.

    0 comments No comments