Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Feature] Support Emulators such as Azurite and Azure Storage Explorer #9729
Be able to use DefaultAzureCredential with Azurite and/or Storage Explorer
Storage emulator and Azurite only support HTTP: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator#authorize-with-shared-key-credentials. TokenCredential does not allow HTTP calls, HTTPS only.
Therefore, an instantiation like this:
Will fail with this error message:
The current workaround looks like this: Use a different Client overload if you want to use emulator:
var client = emulator ? new BlobContainerClient(store, container) : new BlobContainerClient(uri, new DefaultAzureCredential());
Related Azurite Issue: Azure/Azurite#38
Azurite and Storage Explorer do not support Bearer token based credentials. So you will get this exception if you try to call with DefaultAzureCredential
Related Azurite Issue: Azure/Azurite#389
Although there is no work for the Azure SDK team with this feature, I recommend that we keep this issue open to track the workitems on Azurite.