An Azure service that provides a hybrid, multi-cloud management platform for APIs.
V2 Standard does not support backups:-
https://learn.microsoft.com/en-us/azure/api-management/api-management-features
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Standard V2 APIM instance and a storage account that has public access disabled but allows traffic from the Integration subnet of the APIM and the "Microsoft.ApiManagement/Service" resource type and the specific instance of APIM allowed access. It also has the "Allow trusted MIcrosoft Services to access this resource" selected.
Integration subnet of APIM has the "Microsoft.Storage" service connection configured.
I am following this MS KB to setup the backup:-
https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-disaster-recovery-backup-restore?tabs=powershell#back-up-an-api-management-service
And using the "Access using managed identity" method. The Service principal that I am using in Powershell & Managed Identity of APIM has been given the "Storage Blob Data Contributor" role on the storage account.
When I run the following 2 commands from a VM in the same VNET as the APIM Instance I get error: "Backup-AzApiManagement : Long running operation failed with status 'BadRequest'."
$storageContext = New-AzStorageContext -StorageAccountName $storageAccountName
Backup-AzApiManagement -ResourceGroupName $apiManagementResourceGroup -Name $apiManagementName -StorageContext $storageContext -TargetContainerName $containerName -TargetBlobName $blobName -AccessType "SystemAssignedManagedIdentity"
Storage logs seems to indicate that it successfully does the "putblob" operation and within few milliseconds does the "DeleteBlob" operation.
APIM activity logs have the following error for "Backup API Management Service":-
"message": "Unable to backup API service at this time. Please, retry the operation.If the issue persists, please contact support providing correlation ID
How can I troubleshoot this further or what needs to change in my setup to allow the backup?
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
V2 Standard does not support backups:-
https://learn.microsoft.com/en-us/azure/api-management/api-management-features
Hi curious17,
Thanks for reaching out to Microsoft Q&A.
Everything in your networking and RBAC setup is correct, but you’re on a Standard V2 SKU and unfortunately the V2 tiers (Basic V2 and Standard V2) don’t support the backup/restore feature yet as mentioned in MSDOC . That’s why the operation immediately fails with a BadRequest, even though you see the blob creation/deletion in storage logs.
What you can do:
Note: In the docs under Backup and Restore not available in Basic v2 and Standard v2 tiers that v2 tiers don’t support backup.
If after moving to a supported tier you still see the same error, let us know and we can dig into the correlation ID from your APIM activity logs.
Hope this helps!
If the resolution was helpful, kindly take a moment to click on and click on Yes for was this answer helpful. And, if you have any further query do let us know.
Hello mcstudy2022,
Welcome to Microsoft Q&A
Noticing that the PutBlob and DeleteBlob operations succeeded right before the BadRequest ....
What you are experiencing is a disconnect between the APIM Control Plane and the Standard V2 Data Plane.
When you trigger the backup, the APIM Resource Provider (Control Plane) does a pre-flight check. It logs in using the Managed Identity, and because you properly configured the "Trusted Services" and "Resource Instance" rules, Azure Storage lets it through to do the Put/Delete test.
However, once the test passes, the Control Plane tasks the actual APIM background workers to upload the backup. This is where it breaks. In Standard V2, background management traffic (like backups) does not flow through your VNet Integration subnet; it routes out over the public internet. When those background workers attempt the upload using a delegated SAS token instead of direct Entra ID, the Azure Storage firewall drops the connection. This happens because "Resource Instance" exceptions explicitly do not apply to SAS traffic.
To get this working, you simply need to add your Standard V2 APIM instance's Outbound Public IP address directly to the Storage Account's firewall whitelist.
One quick note: Make sure your Storage Account is in a different region than your APIM instance! If they are in the exact same region, the traffic gets routed over an internal Azure backbone IP instead of your public IP, which means your new firewall whitelist won't trigger.
😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!