Adb2c custom policy with sign in button,sign up section and google button

Prateek Rathore 21 Reputation points
2022-05-23T08:47:58.033+00:00

Hi,
I want to create a custom policy with attached screenshot.. as currently Microsoft provide combined signinorsignup policy where there is a signup link then sign in fields with sign in button and then social button (like google). but, my requirements is there is sign in link then signup fields with create account button and then social button (like google).

Please let me know is there any possibility to achieve this ? @AmanpreetSingh-MSFT @MelissaMa-MSFT

Thanks

![204625-image.png]1

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,662 questions
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,311 Reputation points
    2022-05-24T09:44:23.957+00:00

    Hi @Prateek Rathore • Thank you for reaching out.

    For this purpose, you need to have segregated the signup and sign-in policy. Also, the content to the signup page is inserted by api.localaccountsignup, which doesn't insert the IDP buttons on the signup page itself. So, you can have a link with the signup form like Already have an account? Sign in with your local or social account that redirects you to sign-in policy that provides you with options to either sign in using a local account or social IDP like Google.

    1. First, create a unified signupOrSignin policy using Local&SocalAccounts custom policy template. You can then use the "setting.showSignupLink" item key as shown below to hide the Sign up now link so that users can use the policy only for the sign-in purpose only. <ContentDefinition Id="api.signuporsignin">
      <LoadUri>~/tenant/templates/AzureBlue/unified.cshtml</LoadUri>
      <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
      <DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.1.0</DataUri>
      <Metadata>
      <Item Key="DisplayName">Signin</Item>
      <Item Key="setting.showSignupLink">false</Item>
      </Metadata>
      </ContentDefinition>
    2. You can then create a SignUP user journey as mentioned below that you can point to, in your RP file e.g. B2C_1A_SignUp which can be used for sign up only.
      <UserJourney Id="SignUp">  
        <OrchestrationSteps>  
      
          <OrchestrationStep Order="1" Type="ClaimsExchange">  
            <ClaimsExchanges>  
              <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />  
            </ClaimsExchanges>  
          </OrchestrationStep>  
      
          <!-- This step reads any user attributes that we may not have received when in the token. -->  
          <OrchestrationStep Order="2" Type="ClaimsExchange">  
            <ClaimsExchanges>  
              <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />  
            </ClaimsExchanges>  
          </OrchestrationStep>  
      
          <OrchestrationStep Order="3" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />  
      
        </OrchestrationSteps>  
        <ClientDefinition ReferenceId="DefaultWeb" />  
      </UserJourney>  
      
    3. Update your custom HTML page to insert Already have an account? Sign in with your local or social account link to the signup page that redirects you to the sign-in policy. Refer to page source of my html page.
    4. Update the<LoadUri> with the link to your custom html page under `<ContentDefinition Id="api.localaccountsignup">

    Click here to see the experience that you will get after you complete the above steps.

    Note: I have not added <Item Key="setting.showSignupLink">false</Item> to my policy, so you'll see Don't have an account? Sign up now link on the sign-in page.

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

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful