Is There a Way to Restrict Azure API Management Endpoint By Subscription?

Viewed 343

In Azure API Management, is it possible to restrict an endpoint for an API by a subscription?

I know it's possible to restrict access to the whole API/Product by subscription, but can that be filtered down even further such that a subscription could be limited to specific endpoints of an API?

1 Answers

Restricting access for specific endpoints can be achieved using policies, and more specifically through the use of the Validate JWT policy. It allows authorizing access to specific operations (specific endpoints) of the API.

The documentation has the following example which shows how to define a policy that restricts HTTP methods: https://docs.microsoft.com/en-us/azure/api-management/policies/authorize-request-based-on-jwt-claims. You can modify the when condition to check the request URL instead of the method.

Related