question

SHASHANKMEHTA-3937 avatar image
0 Votes"
SHASHANKMEHTA-3937 asked SHASHANKMEHTA-3937 edited

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?

azure-managed-identity
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers