Set backend url in Azure API Management policy removes Authorization header in the request

Moin Syed 0 Reputation points
2024-06-26T02:48:36.28+00:00

I am using the Azure api management as a pass through; All api requests are proxied to azure api management and they are redirected to the original api.

The request comes to api.xxx.com with tenant name in header, it is redirected to tenant.xxx.com.

The problem I face is that I set the backend url in the policy on every request based on the tenant. When the request reaches the actual api at tenant.xxx.com, the Authorization header is removed and it returns 401.

The logs say "301 Moved Permanently", keeps other headers but removes Authorization header.

How do I make it work?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,943 questions
0 comments No comments
{count} votes