An error occurred when running automation account runbook to access blob storage .

张东华 1 Reputation point
2021-07-13T10:50:29.773+00:00

I've got problem with running runbook access to blob storage .

It works fine - if blob storage 's networking is allowed for access to all networks.

If "Allow access from" set is "Selected networks" , it stops working , and I'm receiving message :

Set-AzStorageBlobContent : This request is not authorized to perform this operation. HTTP Status Code: 403 - HTTP Error Message: This request is not authorized to perform this operation. ErrorCode: AuthorizationFailure ErrorMessage: This request is not authorized to perform this operation. RequestId:3918a830-e01e-0051-35ca-77230b000000 Time:2021-07-13T09:33:43.3067086Z At line:50 char:17 + ... Set-AzStorageBlobContent -Force -File ".\$firewallinfofil ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzStorageBlobContent], StorageException + FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.SetAzureBlobContentCommand

Client is not allowed to set All networks,How can I secure access to storage ?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,257 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,771 Reputation points
    2021-07-22T06:50:58.107+00:00

    @张东华 Welcome to Microsoft Q & A Community Forum. Its a known issue that when restricting network access to storage account , you will not be able to access it using Azure Automation as Automation service isn't part of trusted services registered within Azure subscription.

    In order to achieve your requirement, I would suggest you to use Hybrid Worker to execute the runbook so that you can restrict the access to the storage account.

    I also would recommend you to navigate here and share your feedback or suggestions directly with the responsible Azure feature team and clicking the vote button of your suggestion to raise visibility and priority on it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.