Get ClientIp in backend service (behind FrontDoor and APIM)

Copper Contributor


Azure Front Door connects to APIM (external mode) that forwards the requests to services inside AKS.

Services are monitored with Application Insights.

The target is to be able to retrieve client IP in our backend service thanks to an Header.



We have tested multiple ways to do so:

- via the header X-Forwarded-For

- via the header X-Azure-ClientIP

- via a policy in APIM with the following field: "<value>@(context.Request.IpAddress)</value>"


None of these methods works to retrieve the clientIP, we get Microsoft datacenters IPs instead. 


Do you have an idea to be able to get this clientIP in backend service? Thank you for any tips!

0 Replies