Azure APIM Could not Retrieve the Subscription Key

A few days ago, I noticed there were some fresh updates in Azure APIM along with some new found error messages.

I was getting the above message when testing APIs from within APIM. In previous instances, you had been prompted to assign the subscription on your API calls using the “Ocp-Apim-Subscription-Key” (subscription keys are what you provide your users to pass as headers so you can access your APIs).

Seeing this message didn’t seem “wrong” but it felt odd based on my permissions.

The solution to the problem was to create a role assignment for my users and assign them to the role API Management Service Contributor.

Now when I navigated back to my APIM testing page (after waiting and refreshing for about 5 minutes), I then noticed that the prompt for any subscription was removed and I was now able to call my API without even having to supply the subscription header.

One less step in testing APIs