OpenId Connect For Azure App Service - Web API

Ligesh Koshy 1 Reputation point
2022-05-14T02:38:11.56+00:00

I am building a ASP.NET Core Web API (C#) that gets deployed in Azure App Service. I am using PING Federate authentication ( configured via OpenID Connect configuration within the Azure App Service). Without any additional code, if I deploy a sample Web Application, the Web Application gets authenticated successfully. But when I deploy a Web API, it throws 401 error, when the deployed API is accessed from a front end application. The user.IsAuthenticated is always false.

Please help to address the following issues--
How will I get the API authenticated by default when called from a Front end application (single sign on - Kerberos is enabled)?
How will I get the logged in User Identity within the API code?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,170 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,875 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.