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

1

6

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

Evans answered 24/1, 2022 at 13:9 Comment(0)
E
5

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

Evans answered 24/1, 2022 at 16:45 Comment(1)
Not sure this answer is very helpful, for me removing the CreateIfNotExists() line worksBanderole

© 2022 - 2024 — McMap. All rights reserved.