Share via

DateTimeDropdown does not return a value when used as a DisplayClaim

Chris Hewitt 1 Reputation point
2021-04-26T14:18:20.287+00:00

I have a claims defined as follows

<ClaimType Id="Id">
  <DisplayName>Patient Identitfier</DisplayName>
  <DataType>string</DataType>
  <UserInputType>TextBox</UserInputType>
</ClaimType>
<ClaimType Id="ValidationMethod">
    <DisplayName>Send validation code by</DisplayName>
    <DataType>string</DataType>
  <UserHelpText>Add help text here</UserHelpText>
  <UserInputType>RadioSingleSelect</UserInputType>
  <Restriction>
    <Enumeration Text="Email" Value="Email" SelectByDefault="true" />
    <Enumeration Text="Mobile" Value="Mobile" SelectByDefault="false" />
    <Enumeration Text="Landline" Value="Landline" SelectByDefault="false" />
  </Restriction>
</ClaimType>

<ClaimType Id="DateOfBirth">
  <DisplayName>Date of Birth</DisplayName>
  <DataType>date</DataType>
  <UserHelpText>Add help text here</UserHelpText>
  <UserInputType>DateTimeDropdown</UserInputType>
</ClaimType>

When using it in a DisplayControl (or as a DisplayClaim in a technical profile using a display control) e.g.

<DisplayControl Id="patientRegistrationControl" UserInterfaceControlType="VerificationControl">
  <InputClaims>
    <!-- <InputClaim ClaimTypeReferenceId="objectId" /> -->
  </InputClaims>
  <DisplayClaims>
    <DisplayClaim ClaimTypeReferenceId="DateOfBirth" Required="true" />
    <DisplayClaim ClaimTypeReferenceId="Id" Required="true" />
    <DisplayClaim ClaimTypeReferenceId="ValidationMethod" Required="true" />
    <DisplayClaim ClaimTypeReferenceId="ValidationCode" ControlClaimType="VerificationCode" Required="true" />
  </DisplayClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="extension_IsPatient" />
    <OutputClaim ClaimTypeReferenceId="extension_IsValidated" />
  </OutputClaims>
  <Actions>
    <Action Id="SendCode">
      <ValidationClaimsExchange>
        <ValidationClaimsExchangeTechnicalProfile TechnicalProfileReferenceId="REST-GeneratePatientCode2" />
      </ValidationClaimsExchange>
    </Action>
    <Action Id="VerifyCode">
      <ValidationClaimsExchange>
        <ValidationClaimsExchangeTechnicalProfile TechnicalProfileReferenceId="REST-VerifyAndRegisterPatient" />
      </ValidationClaimsExchange>
    </Action>
  </Actions>
</DisplayControl>

the Date time dropdown control is rendered as normal but the selected value is not posted back in the form. E.g. when pressing the Send the body is &Id=2313123&ValidationMethod=Mobile The DateOfBirth value is nowhere to be seen.

If I change UserInpurType on the DatOfBirth claim to TextBox the value is passed.

Is this a known issue/limitation?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

2 answers

Sort by: Most helpful
  1. Chris Hewitt 1 Reputation point
    2021-06-01T08:17:31.527+00:00

    If that is the case the documentation needs updating to clarify that. Currently it says:

    The ClaimType element in the DisplayClaims collection needs to set the UserInputType element to any user input type supported by Azure AD B2C. Examples are TextBox or DropdownSingleSelect.

    It explicitly states "any user input type supported by Azure AD B2C" and only lists TextBox or DropdownSingleSelect as examples.

    Was this answer helpful?

    0 comments No comments

  2. Siva-kumar-selvaraj 15,741 Reputation points Volunteer Moderator
    2021-05-26T10:07:05.803+00:00

    Hello @Chris Hewitt ,

    Thanks for reaching out and apologize for delayed response.

    Display claim currently support - UserInputType element to TextBox or DropdownSingleSelect. Please refer following article for more detail.

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/technicalprofiles#displayclaim

    Hope this helps.

    -----------

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

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.