2. Using AAD authentication with Azure Blob Storage
We now leverage Azure Identity to use Azure AD authentication to connect to Blob Storage.
The 2 providers we register are:
- The managed identity one, for when the app runs on Azure.
- The VS Code one, which uses the account you're signed into with the Azure Account extension.
We also add some logic to support both local development and running in Azure, as we most likely don't want to use AAD auth when developing locally against Azurite:
- If the connection string is a valid absolute URI like
https://<account-name>.blob.core.windows.net
, we use AAD auth. - Otherwise, we assume it's a regular connection string.
Diff from previous tag: 1-blob-storage-with-connection-string...2.blob-storage-with-aad-auth