Azure multi-tenant app read/write to storage account using RBAC

Porsche Me 131 Reputation points

Can two Azure Tenants (with RBAC) use a storage account for data exchange? We tried and getting 401 error.
Any help to resolve this is much appreciated.

Below is our scenario...

Tenant 1: tenantA
Multi Tenant App: appA (daemon app type)

Tenant 2: tenantB
Storage Account: storageB
Tenant Admin consent "appA" and grant 'Storage Blob Data Contributor' application permission on storageB. Below is how we set permissions (We choose Microsoft Graph User.Read.All for lack knowledge what else to choose)

Now, Can tenantA write to storageB using Azure Storage SDK?
Well, we are getting below exception when we tried!
*Azure.RequestFailedException: Server failed to authenticate the request. Please refer to the information in the www-authenticate header.
Status: 401 (Server failed to authenticate the request. Please refer to the information in the www-authenticate header.)
Error Code: InvalidAuthenticationInfo

Server: Microsoft-HTTPAPI/2.0  
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,661 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,412 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,359 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Porsche Me 131 Reputation points

    This is now resolved, issue was...

    We switched using app host tenant ID (tenantA) to consented tenant ID (tenantB).