ASP.NET Core
I am building a new MVC app using .NET Core 3.1 and will be using Windows Authentication. When I run the code locally (debugging in VS2019) I get the value in User.Identity.Name but when I am hosting the same on Azure App Service I get that as blank.
On Azure Portal under Authentication (classic), I have turned on AppService Authentication and under "Action to take when request is not Authenticated" option I have selected "Login with Azure Active Directory"
Under Authentication Provider: Azure Active Directory is configured.
Under Azure Active Directory the application is registered under App Registration blade. When I access the site after publishing to Azure it asks me to login with my Active directory credentials which is working fine.
Need to understand why I am not able to get the User.Identity.Name, is there anything else that needs to added to the code?