Customize Error message Azure AD login AADSTS50105

Copper Contributor

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

4 Replies
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

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

@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
    }

}
Thanks a lot for your help, but it is a standard app, where we can't read error codes :-(. But I have added a comment to the improvement idea: https://feedback.azure.com/d365community/idea/c52019e3-b825-ec11-b6e6-000d3a4f0789
Kind regards,
Simon