0

How do I define a technical profile with operation "read" using username? I tried input type as "signInNames.userName", "signInNames.username" - but the adb2c page directly throwns an exception error without a ADB2C code.

This is how I defined the signInNames.userName claimtype. Is this to be blamed?

       <ClaimType Id="signInNames.userName">
        <DisplayName>Sign in name</DisplayName>
        <DataType>string</DataType>
        <UserHelpText/>
        <UserInputType>TextBox</UserInputType>
      </ClaimType>
        <TechnicalProfile Id="AAD-UserReadUsingUsername">
          <Metadata>
            <Item Key="Operation">Read</Item>
            <Item Key="RaiseErrorIfClaimsPrincipalDoesNotExist">true</Item>
          </Metadata>
          <IncludeInSso>false</IncludeInSso>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="signInNames.userName" Required="true" />
          </InputClaims>
          <OutputClaims>

            <!-- Optional claims -->
            <!-- <OutputClaim ClaimTypeReferenceId="signInNames.userName" /> -->
            <OutputClaim ClaimTypeReferenceId="objectId" />
            <OutputClaim ClaimTypeReferenceId="displayName" />
            <OutputClaim ClaimTypeReferenceId="otherMails" />
            <OutputClaim ClaimTypeReferenceId="givenName" />
            <OutputClaim ClaimTypeReferenceId="surname" />
          </OutputClaims>
          <IncludeTechnicalProfile ReferenceId="AAD-Common" />
        </TechnicalProfile>

1 Answers1

0

Have a look at this sample.

There are also others in the collection to do with username.

rbrayb
  • 46,440
  • 34
  • 114
  • 174
  • Thanks rbrayb. collecting username and passing it along as PartnerClaimType="signInNames" works as mentioned in your reference. – TheGreatApe May 24 '23 at 13:23