Azure AD B2C Custom policy Rest API Validation technical profile with response status code 200 /400/409 as output claims

Sajna M Nair 26 Reputation points
2023-04-09T16:03:25.0166667+00:00

As per the current requirement in forgot password custom policy before sending the Email verification code need to run a Rest API validation technical profile, which should allow to continue further on success / error status and should add some precondition based on response status code of this rest validation technical profile in action. Can some please help me on this?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
3,256 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
25,048 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,211 Reputation points Microsoft Employee Moderator
    2023-04-10T20:50:05.8866667+00:00

    Hi @Sajna M Nair , you can define a RESTful technical profile in your custom policy. To validate claims by using a validation technical profile in a custom policy, you can define a validation technical profile. You can set the ContinueOnError attribute to true to allow the policy to continue even if the REST API returns an error status code. You can add a precondition to check the response status code of the REST API by using the Precondition element with the Type attribute set to ClaimsExist and the Value element set to the name of the claim that contains the response status code. If the response status code is 200, 400, or 409, you can add an Action element with the value SkipThisValidationTechnicalProfile to skip the validation technical profile. Please let me know if you have any questions and I can help you further. If this answer helped you please mark it as "Verified" so other users can reference it. Thank you, James


Your answer

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