This folder contains unit tests for Azure AD B2C claims. For more information, check out the ClaimsSchema article.
Azure AD B2C supports various user input types, such as a textbox, password, and dropdown list that can be used when manually entering claim data for the claim type. This unit test shows the types of UserInputType.
Live demo Quick deploy Policy Documentation
The claim Simple mask indicates that the text mask is applied to the leading portion of a string claim. This unit test shows how to use the claim mask type of Simple
with verity of formats.
Provide a phone number, then select Continue. The ExperimentalTechnicalProfile technical profile calls the CopyPhoneNumber claims transformations to copy the phone number you provided inputPhoneNumber
into the outputPhoneNumber
claims. The next page renders the outputPhoneNumber
claims with the corresponding format.
Live demo Quick deploy Policy Documentation
The claim Regex mask indicates that a regular expression is applied to the string claim as whole. This unit test shows how to use the claim mask type of Regex
with verity of formats.
Provide an email address, then select Continue. The ExperimentalTechnicalProfile technical profile calls the CopyEmail claims transformations to copy the email address you provided inputEmail
into the outputEmail
claims. The next page renders the outputEmail
claims with the corresponding format.
Live demo Quick deploy Policy Documentation
The claim Regex restriction pattern defines a regular expression that claim must match in order to be valid.
Live demo Quick deploy Policy Documentation
The claim Restriction enumeration defines available options for the user to select for a claim in the user interface, such as a value in a CheckboxMultiSelect, DropdownSingleSelect, or RadioSingleSelect. This unit test shows the usage of restriction enumeration in a claim definition and localization.
This unit test includes the following claims:
- Dropdown1 a string dropdown claim. It defines the restriction enumeration options in the claim definition. The options will be presented for all languages.
- Dropdown2 a string dropdown claim. It defines the restriction enumeration options localization section of the policy (Spanish and Hindi). For other languages the options from the claim definition will be presented.
- Dropdown3 a string dropdown claim. It defines the restriction enumeration options localization section of the policy (Spanish and Hindi). For other languages the dropdown list will be empty.
Live demo (default) Live demo (Spanish) Live demo (Hindi) Live demo (German) Quick deploy Policy Documentation