Demonstrate how to use a displayControl to conditionally process on the users decision to verify their account via Email OTP or SMS.
-
You can automate the pre requisites by visiting this site if you already have an Azure AD B2C tenant. Some policies can be deployed directly through this app via the Experimental menu.
-
You will require to create an Azure AD B2C directory, see the guidance here.
-
To use the sample policies in this repo, follow the instructions here to setup your AAD B2C environment for Custom Policies here.
-
For any custom policy sample which makes use of Extension attributes, follow the guidance here and here. The
AAD-Common
Technical profile will always need to be modified to use yourApplicationId
andObjectId
.
- Read the users profile once they provide their email address. This will provide their phone number used to Sign Up.
- Use a displayControl to display the user a radio box selection on whether to verify their account via Email or Phone.
- The displayControl uses preconditions on the
SendCode
andVerifyCode
actions to control theValidationClaimsExchangeTechnicalProfile
based on the users selection on whether to use phone or email to verify their account. That decision is held in the claimmfaType
, which acts as the radio box.
Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [azure-ad-b2c]. If you find a bug in the sample, please raise the issue on GitHub Issues. To provide product feedback, visit the Azure Active Directory B2C Feedback page.
This sample policy is based on SocialAndLocalAccountsWithMFA starter pack. All changes are marked with Sample: comment inside the policy XML files. Make the necessary changes in the Sample action required sections.