Forum Discussion

curious7's avatar
curious7
Brass Contributor
May 14, 2026
Solved

Unable to backup APIM instance to storage account

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?

  • V2 Standard does not support backups:-

    https://learn.microsoft.com/en-us/azure/api-management/api-management-features

2 Replies