1
votes

I have an Azure Runbook which runs every morning.

The Runbook executes 'Get-AzureStorageBlob' but since we enabled the firewall on the storage account, it now fails with error:

Get-AzureStorageBlob : The remote server returned an error: (403) Forbidden. HTTP Status Code: 403 - HTTP Error Message: This request is not authorized to perform this operation. At line:8 char:17 + ... ldBackups = Get-AzureStorageBlob -Context $BackupCtx -Container $Back ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-AzureStorageBlob], StorageException + FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobCommand

I have enabled 'Allow trusted Microsoft services to access this storage account' on the storage account firewall, but it still fails.

Does anyone know how I can get this to run successfully?

1

1 Answers

0
votes

For now, the workaround is deploy a Hybrid Runbook Worker, then add that public IP address to storage account's firewall, in this way, Azure storage will not block your runbook.

About the trusted Microsoft services:

enter image description here

The trusted Microsoft services not contain runbook.

Hope this helps.