Customise or catch AADSTS50105 error page (MSAL - React)

Colin Robinson 5 Reputation points
2023-03-20T06:56:00.93+00:00

Hi,

I'm using MSAL/REACT for a SPA, I have an app that requires assignment.

assignment

Works fine.

However the error message it gives to users isn't so user friendly.

Capture

Is there any way to either customise this message, or catch the error within MSAL before the redirect?

Thanks!

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,536 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,610 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. James Hamil 17,611 Reputation points Microsoft Employee
    2023-03-21T21:56:56.7433333+00:00

    Hi @Colin Robinson , you can use localization string IDs for this. For example from here:

    <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfMissingRequiredElement">Missing required element: {0}</LocalizedString>
    

    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

    0 comments No comments