Open Riaku opened 6 months ago
I narrowed it down to the specific REST call.
The following Call fails, and is what is used by the az apim module
$subscription = ''
$resourceGroup = ''
$apimInstance = ''
$apiId = ''
$payload = @"
{
"properties": {
"sourceApiId": "/apis/$apiId;rev=21",
"path": "api-path"
}
}
"@
Invoke-AzRestMethod -path "/subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.ApiManagement/service/$apimInstance/apis/$apiId;rev=21?api-version=2021-08-01" -Method PUT -payload $payload
The Following call succeeds after changing the sourceApiId field in the payload.
$subscription = ''
$resourceGroup = ''
$apimInstance = ''
$apiId = ''
$payload = @"
{
"properties": {
"sourceApiId": "/subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.ApiManagement/service/$apimInstance/apis/$apiId;rev=21",
"path": "api-path"
}
}
"@
Invoke-AzRestMethod -path "/subscriptions/$tenant/resourceGroups/$resourceGroup/providers/Microsoft.ApiManagement/service/$apimInstance/apis/$apiId;rev=21?api-version=2021-08-01" -Method PUT -payload $payload
This currently works for two users at my organization, but does not work for myself or our build agents.
I can't figure out any difference in permissions which might be causing this.
+1 Seeing this issue in the last few days when using New-AzApiManagementApiRevision
Seems to be region specific. We get intermittent success and failures. If the x-ms-routing-request-id shows CENTRALUS, the call to New-AzApiManagementApiRevision works. If it's from NORTHCENTRALUS, it fails. Our resources are in North Central US but the x-ms-routing-request-id will show calls from both regions.
According to Microsoft support, it's related to a security change and may be pushed to other regions.
Any update on this? seems to still be an issue.
Description
New-AzApiManagementApiRevision is failing when being called.
The output is displaying " Property id '/apis/$apiId;rev=13' at path 'properties.sourceApiId' is invalid
The command appears to get the API first, then on the PUT call to change fails to get the API The error also states that "Expect fully qualified resource Id" however when passing a full resource ID the web request fails the get request and appends the full resource ID onto the resource ID without the API id"
The last successful deploy was on January 4th. the next attempted deploy was February 4th and failed.
Learn.microsoft. states the ID should just be the name, while the command itself states the API id should be the full resource ID.
It appears the get request is handled via just the API ID while the put request is handled differently.
Issue script & Debug output
Environment data
Module versions
Error output