Thank you for getting back and letting us know that you have applied rate limiting feature of Azure Front Door WAF instead.
The other reason that I would like to utilize the original client IP addresses is to be able to conduct proactive monitoring and setting up alerts at APIM to pick up any unusual/undesired usage behavior from the API users (leaking of API Subscription Keys, etc...).@Ben Gimblett did mention the possibility to extract the original IP from the XFF value, can you/Chaitanya please elaborate this further how to achieve this, as I am fairly new to Azure services.
Based on Ben's response above. As the request will be forwarded by the Front Door to Application Gateway, the X-Forwarded-For (XFF) HTTP header field will be appended by the Front Door with client's IP, more details here. Azure Application Gateway will also do the same see the image below
As documented here for Azure Application Gateway the format for x-forwarded-for header is a comma-separated list of IP:port.
If you do not need the port information you can use server variables in Application Gateway
as documented here using the add_x_forwarded_for_proxy server variable to remove the port information.
Later in the APIM side you can use policy to fetch the client IP address from the XFF header.
Hope this helps! Please let me know if you have any additional questions. Thank you!
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.