Why is my Azure API App getting 403 Error when connecting to Storage Account - File Share

Vinson Yuen 121 Reputation points
2021-06-29T16:50:53.007+00:00

I have a Web API that should communicate with a Storage Account file share but is getting a 403 forbidden error when attempting a connection. If I create and run the web API locally I do not get the 403 forbidden error. I've already added the Web API app as a contributor and reader data access role in the Access Control IAM. I have a similar web API setup with a separate storage account running the same code for another client that is working properly. The File Storage is currently open to the internet and has no IP restrictions setup.

The only difference I notice between the the working web api/storage account pair and the 403 forbidden pair is that the working version is running StorageV1 instead of StorageV2.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,722 questions
Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,152 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,648 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 33,051 Reputation points Microsoft Employee
    2021-06-30T21:33:25.99+00:00

    @Vinson Yuen
    It is strange that it works with StorageV1 but not StorageV2. StorageV2 does have some different configuration settings though. This troubleshooting document is for SMB, but the solutions should still apply. Please check these to see if they might be the cause. If you are still having issues please let me know and we can work with you more closely to resolve this.

    0 comments No comments