Forum Discussion

bos4mu's avatar
bos4mu
Copper Contributor
Jul 19, 2024

Customize Error message Azure AD login AADSTS50105

Dear all,

 

we find the error message AADSTS50105 a bit hard to understand and would like to display a custom text to users, on how to request access. Do you know if it is possible to change the Error message Azure AD login?

 

Kind regards,

Simon

  • sdtslmn's avatar
    sdtslmn
    Brass Contributor
    This system-generated error cannot be directly customized at the Azure AD level.
    If you are getting this error from an application or something else if you can deliver the details maybe we can find some workaround
    • bos4mu's avatar
      bos4mu
      Copper Contributor

      Thanks sdtslmn 

      The problem is that the user is not part of a active directory group, if they do not have a license to access an application. We would like to inform the user, that he/she needs to request a license via our IT shop to be added to the group. But it seems this is currently not possible. Do you know, if there is a way to raise an improvement request?

      Kind regards,

      Simon

      • sdtslmn's avatar
        sdtslmn
        Brass Contributor

        bos4mu 

        you can use this link to provide feedback/improvement ideas

        https://feedback.azure.com/d365community

        and additionally 

        if this is an application you have developed 

        you can create an errorcontroller  

         

        first add this code to your startup.cs

        app.UseStatusCodePagesWithReExecute("/Error/{0}"); 

         

        then create ErrorController

         

        public IActionResult Error(int statusCode)
        {
            if (statusCode == 50105)
            {
                return View("LicenseError"); // View with your custom message
            }
        
        }

Resources