A cloud-based identity and access management service for securing user authentication and resource access
How to use regular expression conditionally
buyani.mhlongo
30
Reputation points
How to use regular expression in azure B2C conditionally in custom policies depending on the selected value in dropdownlist. e.g if "national_id" is selected apply certain expression on identificationNumber and if its "passport" apply different expression on identificationNumber
<ClaimType Id="identificationType">
<DisplayName>Identification Type</DisplayName>
<DataType>string</DataType>
<UserHelpText>Identification Type</UserHelpText>
<UserInputType>DropdownSingleSelect</UserInputType>
<Restriction>
<Enumeration Text="National ID number"
Value="national_id"
SelectByDefault="true" />
<Enumeration Text="Passport Number"
Value="passport" />
</Restriction>
</ClaimType>
<ClaimType Id="identificationNumber">
<DisplayName>National ID or Passport Number</DisplayName>
<DataType>string</DataType>
<UserHelpText>National ID or Passport Number</UserHelpText>
<UserInputType>TextBox</UserInputType>
</ClaimType>
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Sign in to answer