I've created the ARM template for Azure API Management deployment. In order to enable its REST API I need to select the Enable API Management REST API checkbox in Azure Portal as explained here. I'd like to activate this option within the ARM template but I'm unable to find which resource to add/modify in my template to achieve it.
Asked
Active
Viewed 710 times
2 Answers
1
This one https://learn.microsoft.com/en-us/rest/api/apimanagement/2019-01-01/tenantaccess/update. In general whatever Azure portal does it does through same public API used by templates. So usually you can open browser dev console and see what call is being made behind the scenes.

Vitaliy Kurokhtin
- 7,205
- 1
- 19
- 18
-
I haven't found a way how to do it with ARM template but thanks your hint with the browser dev console I've created PowerShell script that enables the REST API after the APIM deployment. I'm accepting your answer since it led me to resolve the problem. – Peter Jan 23 '20 at 12:30
-
1You need to add this tenant/access resource into ARM template and link it with APIM service resource with dependsOn to make sure that it's created after the service. – Vitaliy Kurokhtin Jan 23 '20 at 16:41
-
I've tried define it as a resource in ARM template that but on deployment I've received "The requested resource does not support http method 'PUT'." - perhaps because the API call uses PATCH method? – Peter Jan 24 '20 at 13:14
1
If anyone is still looking for an answer, the below template does the job of enabling Management REST API in Azure APIM
{
"type": "Microsoft.ApiManagement/service/tenant",
"apiVersion": "2020-06-01-preview",
"name": "[concat(parameters('ApimServiceName'), '/access')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('ApimServiceName'))]"
],
"properties": {
"enabled": true
}
}

Mudassir Syed
- 21
- 2