Why Azure auth/callback authentication throwing error only for APIM URL

Antony Raj 0 Reputation points
2024-02-14T11:20:20.79+00:00

We using Cookie authentication in our .Net Core API connecting to Angular App When we deploy the application in App Service, the authentication & Authorization is happening properly, then we get Cookie generated & the application request going to our API all works fine. But when we use APIM- URL which is pointing to out API and do the same call of the API from Angular, the request going to Challenge method of Azure, & getting error as follows User's image

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,447 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2024-02-20T14:28:10.78+00:00

    Antony Raj Thanks for posting your question in Microsoft Q&A. From the description above, you are using cookie authentication in your client app to the backend API which works fine but going through APIM it fails. There is no native support for cookie authentication in APIM and APIM supports JWT token i.e. token based. However, APIM can forward the cookie header to a backend or parse it in the policy. I suggest you validate how the client app is attempting the cookie authentication and sending the header to APIM.

    0 comments No comments

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.