Search code examples
policyazure-api-management

How do I extract an ip address in the azure api management policy?


  1. Is there an out of the box policy to extract the incoming ip address? I could not find one.
  2. Do I need to write code to do that? If so, how do I go about it? What are the other alternatives?

Solution

  • You can extract IP address in any policies using policy expressions. The expression would be context.Request.IpAddress