Storage clients should use tenant ID from authentication challenge #44167
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Storage
Storage Service (Queues, Blobs, Files)
Is your feature request related to a problem? Please describe.
We used Python SDK for multi tenant authentication. Our tenant is A and we want to access the blob storage in tenant B. We have set up the cross tenant authentication. In our python SDK. Our code is as follows. We can successfully access the blob storage.
But when we use the Java SDK, we had the authentication issue.
Describe the solution you'd like
I'd like that Java SDK behaves the same way as Python SDK. Based on my debugging, the Python SDK tries to access to storage and if the http status is 401, it extracts the destination tenant ID and use it to fetch the access token again: _authentication.py:167
Describe alternatives you've considered
I can extract the tenant id separately or ask our customers to provide it but I've found the python sdk solution a convenient and hide the complexity from the end user.
Additional context
The issue was reported to the go-sdk as well: Azure/azure-sdk-for-go#23678
The text was updated successfully, but these errors were encountered: