Rick
Rick

Reputation: 415

Getting RequestFailedException: Public access is not permitted on this storage account when accessing Blob Storage in Azure

Scenario:

I have an Azure Web App that is trying to access a Blob Storage container, and I get the following error: RequestFailedException: Public access is not permitted on this storage account.

I am trying to use Managed Identities for the App to authenticate against the Blob Storage without having to make it public.

They are both in the same VPN, in the same Region

Any idea where it could be going wrong?

Thanks!

App Service Plan: S1

enter image description here

Some environment variables

Environment Variables

There is the System Assigned Managed Id

enter image description here

The Azure Role Assignments for the Managed Id:

enter image description here

Finally the Code:

enter image description here

And some of the Blob Storage Configuration

enter image description here

They are both in the same VNET

enter image description here

enter image description here

enter image description here

Upvotes: 6

Views: 23301

Answers (1)

Rick
Rick

Reputation: 415

Ok so Devil is in the details they say.

Even though the container already existed, that line failed throwing the Public Access not allowed which makes complete sense.

Sorry for inconvenience.

enter image description here

Upvotes: 5

Related Questions