Share via

Error when linking Azure Function to API Management

dsaipta-7344 45 Reputation points
2023-06-12T20:24:41.32+00:00

I get the following error whenever I try to link an Azure Function to an existing API Management instance. This does not happen if I create a new APIM instance as part of linking the function. Only when trying to link to an existing instance. I can't deduce the reason this error should be occurring, however based on the configuration information.

The request did not have a subscription or a valid tenant level resource provider

Some details from error summary:

"code": 404

"message": "The request did not have a subscription or a valid tenant level resource provider. (Code: MissingSubscription)", "code": 404, "error": { "message": "ajaxExtended call failed", "name": "AjaxError", "stack": "AjaxError: ajaxExtended call failed\n at n.t (https://portal.azure.com/Content/Dynamic/Dv1seNw9hbMj.js:57:857)\n at new n (https://portal.azure.com/Content/Dynamic/fi7NwFeX8cz_.js:1:46874)\n at T.reject (https://portal.azure.com/Content/Dynamic/fi7NwFeX8cz_.js:1:144365)\n at Object.<anonymous> (https://portal.azure.com/Content/Dynamic/fi7NwFeX8cz_.js:1:144162)\n at u (https://portal.azure.com/Content/Dynamic/Dv1seNw9hbMj.js:42:22828)\n at c (https://portal.azure.com/Content/Dynamic/Dv1seNw9hbMj.js:42:23130)", "extension": "Microsoft_Azure_ApiManagement", "type": "MsPortalFx.Errors.AjaxError", "baseTypes": [ "MsPortalFx.Errors.AjaxError", "MsPortalFx.Errors.Error" ], "data": { "uri": "https://management.azure.com/api/invoke", "type": "GET",

"commandName": "Microsoft_Azure_ApiManagement.",        "status": 404,        "statusText": "error",        "duration": 27.5      },      "errorLevel": 2,      "timestamp": 45724.39999997616,      "innerErrors": [],      "textStatus": "error",      "errorThrown": "",      "jqXHR": {}    }  }}
Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

Azure
Azure

A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.


Answer accepted by question author

navba-MSFT 27,625 Reputation points Microsoft Employee Moderator
2023-06-15T04:25:31.0633333+00:00

@dsaipta-7344 Apologies for the late reply. I had a discussion internally with the portal team. The cause was due to updating the api-version to 2022-09-01-preview, there is an issue with retrieving the collection of APIM services, which format the "id" field wrongly.

This resulted in the error The request did not have a subscription or a valid tenant level resource provider.

As a quick fix, please use the below portal link:
https://portal.azure.com/?apimApiVersion=2022-08-01&apimPreviewApiVersion=2022-08-01

Then Navigate to your Azure Function APP Blade and click on the API Management and Select the concerned APIM resource and the API and try Linking you API. This should work fine now.

User's image

**

Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.