1

Use case : As a developer i want to to extract the redirect_uri from the b2c idp url and then apply claim transformation preferably a string one to extract certain information and use that to build the loadURi under content definition and display the html pages dynamically

Below is the b2c idp url https://something.b2clogin.com/something.onmicrosoft.com/B2C_1A_Signup_Signin/oauth2/v2.0/authorize?response_type=id_token&scope=openid%20profile&client_id=some_id&redirect_uri=https%3A%2F%2Fsomething.somedomain.com&state=somestate0%3D&nonce=some_id&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.4.4&client-request-id=some_client_request_id&response_mode=fragment

From the above redirect_uri = https://something.somedomain.com-- using a claim transformation i want to extract somedomain

  1. make the call to the parameter in the relying party.xml as below
    <DefaultUserJourney ReferenceId="SignUpOrSignIn" />
    <UserJourneyBehaviors>
      <ContentDefinitionParameters>
        <Parameter Name="redirect_uri">{OIDC:RedirectUri}</Parameter>
    </ContentDefinitionParameters>```
 
 

 Build the LoadUri in contentdefinition of api.selfasserted
 ```<ContentDefinition Id="api.selfasserted">
        <LoadUri>https://somestoragaccount/{OIDC:RedirectUri}/unified.html</LoadUri>
        <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
        <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.0.0</DataUri>
        <Metadata>
          <Item Key="DisplayName">Collect information from user page</Item>
        </Metadata>
      </ContentDefinition>```


  • Hi @bibhumishra, did the suggested solution work for you? Do let me know if it solved your problem else share more details so I can troubleshoot or else do accept it for helping other community members. – Kartik Bhiwapurkar Jul 25 '22 at 04:36

1 Answers1

1

• I would suggest you to please refer to the string claims transformations as stated in the below document as described for your reference: -

https://learn.microsoft.com/en-us/azure/active-directory-b2c/string-transformations

In that, the string comparison, claims transformation, change case, comparison and other scenarios are explained in detail.

Also, refer to the below claim resolver documentation link that explains the various parameters to be included in the technical profile for direct sign-in and other scenarios: -

https://learn.microsoft.com/en-us/azure/active-directory-b2c/claim-resolver-overview

Kartik Bhiwapurkar
  • 4,550
  • 2
  • 4
  • 9