azureazure-api-managementsubscriptionapi-key

Azure: API Service does not require API-KEY even though Subscription Required is checked


I have an App Service (an API specifically) and it's working great. I'm trying to add an API Key, which I'm told is the same as adding a Subscription Key to the API Management Service.

I added the App Registration to an API Management Service, then under Settings I checked Subscription Required.

Subscription Required Checked

I made a Subscription Key under the API Management Service and saved it.

When I make the API call via postman, without the Subscription Key, I still get a good response with a 200.

Is there something else I need to do to require an API Key?


Solution

  • I have reproduced the reported issue at my environment as below-

    Here I am using default Echo API wherein no products are associated to it currently and Subscription Key check box is ticked.

    enter image description here

    when I am trying to call this API via Postman, its giving me 200 OK result alike you.

    enter image description here

    When I associated my API to a Product(Starter), I got the Access denied due to missing subscription key error while calling via Postman. Because In Product level, its checking the Subscription as its enable there. You can choose the Scope while creating Subscription key as well whether your Subscription key is for all the API or for specific Product.

    enter image description here

    enter image description here

    enter image description here

    enter image description here

    After providing the Subscription key, I am getting 200 OK result.

    enter image description here