Developer Guy
Developer Guy

Reputation: 2434

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

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?

Upvotes: 3

Views: 1508

Answers (1)

Nadine Raiss
Nadine Raiss

Reputation: 641

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://learn.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.

Upvotes: 1

Related Questions