Azure AD B2C - blazor web assembly change user flow at runtime.

ALEXANDER XANTHOUDAKIS 1 Reputation point
2022-09-25T17:18:50.497+00:00

How can I use two (or more) user flows for user Sign Up from the same client application in Azure AD B2C? I want to be able to delegate to different signup flow based on the type of user that will be selected via the web application. One button "User Sign Up" and one button "Company Sign Up". How can I achieve the above functionality?

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

2 answers

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2022-09-26T17:00:05.457+00:00

    Hi @ALEXANDER XANTHOUDAKIS ,

    Thanks for reaching out.

    I understand you are looking different SignUpSignInPolicyId for different signUp option in blazor web assembly.

    You can achieve this by-passing policy parameter in based on specific action in the controller class. Policy parameter allows you to provide different Azure AD policy id for each action.

     properties.Items["policy"] = "B2C_1_SignIn";  
    

    Reference: https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-web-application-options#pass-the-azure-ad-b2c-policy-id

    Hope this will help.

    Thanks,
    Shweta

    ---------------------------------------

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

  2. ALEXANDER XANTHOUDAKIS 1 Reputation point
    2022-09-29T12:16:00.743+00:00

    Thank you for the info I have already done what you mentioned in Server-Side application (Razor pages) with success ..... but since in web assembly we do not have any Controller classes (since everything runs on client) ...how can we do it??

    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.