Azure APIM warning: Backend service responded with a redirect. Response shown by-passed API Management proxy and came directly from the endpoint specified in the redirect response

skdev 151 Reputation points
2021-08-25T06:03:44.03+00:00

Azure APIM throws below warning in developer portal even though it returns 200 response code and expected data properly from the backend Azure function.
Azure function has Azure AD authentication enabled and the API uses OAuth authentication server configured in the APIM.

Backend service responded with a redirect. Response shown by-passed API Management proxy and came directly from the endpoint specified in the redirect response

What could be the reason?

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,641 Reputation points Microsoft Employee
    2021-08-25T12:24:36.283+00:00

    @skdev the default behavior of the forward-request policy is to not follow redirects which causes clients to perform the redirect instead.

    In this case, while the original request is to your APIM instance, the final response is what the backend returned after your browser followed the redirect. Hence the warning.

    If having clients follow the redirect is the expected behavior, you don't really have to change anything but if otherwise, you could set the follow-redirects attribute to true in your forward-request policy.


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.