Hello @Yan Xu , you can add a Precondition to the desired orchestration step that validates that the isValidEmailDomain
boolean claim, which will be output by a StringCollectionContains transformation.
<Preconditions>
<!-- Skip this orchestration step if isValidEmailDomain does not exist. -->
<Precondition Type="ClaimsExist " ExecuteActionsIf="false">
<Value>isValidEmailDomain</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
<Precondition Type="ClaimEquals" ExecuteActionsIf="false">
<Value>isValidEmailDomain</Value>
<Value>False</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
Alternatively, you can implement a custom API to be consumed by a Validation Technical Profile. Depending on the business rules you implement, your API may return an HTTP 200 response and optional claims (such as isValidEmailDomain
or none) or a 4xx response with error information that can be handled. Take a look to Define a RESTful technical profile in an Azure Active Directory B2C custom policy and Define a validation technical profile in an Azure Active Directory B2C custom policy. You would send the user email address as an InputClaim. For a complete sample that you can customize take a look to Azure AD B2C: Integrate REST API claims exchanges and input validation.
Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.