AD B2C show standard error page when REST API returns 4xx

Florian Huber 11 Reputation points
2022-03-07T16:25:40.147+00:00

Hi,

I'm calling a REST API from an orchestration step just using a TechnicalProfile, but not inside a ValidationTechnicalProfile block.

<OrchestrationStep Order="6" Type="ClaimsExchange">
  <ClaimsExchanges>
    <ClaimsExchange Id="ValidateUserHasAccessToApp" TechnicalProfileReferenceId="REST-HasUserAccessToAppValidator" />
  </ClaimsExchanges>
</OrchestrationStep>

When the API returns some 4xx status code including required fields in body (version, status, userMessage) B2C will directly call the redirect URI with query parameters error, error_description according to OAuth2 rfc6749.

My problem is that the redirect page doesn't behave as it should, meaning it will not correctly interpret the error information given in the query arguments.

My expectation would have been that the failing REST call will cause a B2C exception which will then show the standard error page with content definition api.error. Is there a way to force this behavior, i.e. showing the error page filled with the information received by the REST API?

Thanks,
Florian

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.
2,672 questions
{count} votes