1
votes

I have a requirement like below.

I have to create 3 application in azure b2c. I have to create 3 different custom signin policies. Inside each custom signin policies I have to call different rest api for login not for input validation. My user stores are out side B2C (user store is in sql server). So basically these rest api will check and return whether user is exist or not inside each user store. Then finally I have to assign one application to one custom signin policy. APP 1 - Custom signin policy 1 App 2 - Custom signin policy 2 App 3 - Custom signin policy 3

I will use APPID,secret,tenant name and custom signin policy name in my client application. When i hit login/signin from client application, B2C should show an UI to get user name and password. Based on appid it has to call custom signin policy and validate user name and password. Finally it has to return token back to my client application.

Any help is appreciated.

1
Hi @Vetrivel: What is the main question that you are asking?Chris Padgett
I have to define singin policy application level not tenant level.Vetrivel mp

1 Answers

0
votes

I suggest you to join these policies in 1 file and then: 1) Include content page definition for selection:

      <ContentDefinition Id="api.idpselections">
    <!--
        https://login.microsoftonline.com/static/tenant/default/idpSelector.cshtml
        https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-ui-customization-custom-dynamic
    -->
    <LoadUri>~/tenant/default/idpSelector.cshtml</LoadUri>
    <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
    <DataUri>urn:com:microsoft:aad:b2c:elements:idpselection:1.0.0</DataUri>
    <Metadata>
      <Item Key="DisplayName">Login provider selection page</Item>
      <Item Key="language.intro">Select login provider:</Item>
    </Metadata>
  </ContentDefinition>

And then adjust your journey to something like this:

<UserJourney Id="YourJourneyId">
  <OrchestrationSteps>
    <OrchestrationStep Order="1" Type="ClaimsProviderSelection" ContentDefinitionReferenceId="api.idpselections">
        <ClaimsProviderSelections>
            <ClaimsProviderSelection TargetClaimsExchangeId="LoginProvider1" />
            <ClaimsProviderSelection TargetClaimsExchangeId="LoginProvider2" />
        </ClaimsProviderSelections>
    </OrchestrationStep>
    <OrchestrationStep Order="2" Type="ClaimsExchange">
      <ClaimsExchanges>
        <ClaimsExchange Id="LoginProvider1" TechnicalProfileReferenceId="TechProfileForLogin1" />
        <ClaimsExchange Id="LoginProvider2" TechnicalProfileReferenceId="TechProfileForLogin2" />
      </ClaimsExchanges>
    </OrchestrationStep>
    <OrchestrationStep Order="3" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="YourIssuer" />
  </OrchestrationSteps>
  <ClientDefinition ReferenceId="DefaultWeb" />
</UserJourney>