React Js application where both B2C and B2B authenication is needed

Sasi Kumar 0 Reputation points
2024-10-04T07:02:27.5866667+00:00

Hi Team,

Consider a scenario, that we are having reactjs application which already using azure ad b2c and its using, authenicating customers by app flow. But we need a added feature that need to allow my b2b invited users and internal users to access my application.

We need to perform all the operations that we are using under b2c with b2b (sign-in, sign-up, profile update, reset password, user deletion).

Kindly advise on the above scenario and how to perform this. Is it possible or not?

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,211 Reputation points Microsoft Employee Moderator
    2024-10-07T23:55:04.56+00:00

    Hi @Sasi Kumar , yes this is possible! Make sure that your Azure AD B2C tenant is configured to handle both B2C and B2B users by setting up user flows and custom policies that support both types of users. You can then use the Microsoft Authentication Library (MSAL.js) to handle authentication. MSAL.js supports both B2C and B2B authentication scenarios. Modify your authentication logic to distinguish between B2C and B2B users. You can do this by checking the user's identity provider (IdP) and routing them to the appropriate user flow. Create user flows for sign-in, sign-up, profile update, password reset, and user deletion. Verify that these flows are configured to handle both B2C and B2B users.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    0 comments No comments

Your answer

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