We are using Azure API Management and Powershell to import the configuration on the portal with a script, however whenever the API is imported the "Subscription required" check from the portal is enabled (The API required Subscription Key). We are not using the subscription feature by now on the API so we need to disable this when imported. We are using Import-AzApiManagementApi
and Set-AzApiManagementApi
with the following code:
Set-AzApiManagementApi -ApiId $apiId -Context $context -Protocols @('https') -ServiceUrl $serviceBase$path -Name $api.Name
Set-AzApiManagementPolicy -Context $context -ApiId $apiId -PolicyFilePath "$pwd/src/private/security_policy.xml"
We haven't found in the documentation the way to import the API without this check. Is there any script to disable this feature via powershell?