Azure B2C API connector | Standard Error Message

Manish Aggarwal 36 Reputation points
2022-10-16T12:58:17.34+00:00

Hi Team -

We are working on Azure AD B2C implementation where in we have an API connector to create corresponding user in legacy system.

We have exception handling in place for most of the scenarios, but in some cases when an unhandled exception occurs, the B2C show below error message -
250891-image.png

Is there a way, we can show user some standard error message for e.g. "Something went wrong, please try again later." instead of non user-friendly message.

Microsoft Security Microsoft Entra Microsoft Entra External ID
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 17,951 Reputation points Microsoft Employee Moderator
    2022-10-18T11:14:49.507+00:00

    Hello @Manish Aggarwal ,

    Thanks for posting your query on Microsoft Q&A. In order to send a customized message when API is not accessible we could follow https://learn.microsoft.com/en-us/azure/active-directory-b2c/restful-technical-profile#returning-validation-error-message.

    In a RESTful technical profile, you may raise a localized error message. Using the claims resolver, you can send a contextual claim

    251563-image.png

    The claims could be sent by localizing the REST API https://learn.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview?pivots=b2c-custom-policy#localize-the-rest-api

    Please do let me know if you have any queries in the comments section.

    Thanks,
    Akshay Kaushik

    Please "Accept the answer" and "Upvote" if the above-mentioned suggestion works as per your business need. This will help us and others in the community as well.

    0 comments No comments

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.