Skip to content

2. Using AAD authentication with Azure Blob Storage

Compare
Choose a tag to compare
@mderriey mderriey released this 19 Feb 22:37
b197ed7

We now leverage Azure Identity to use Azure AD authentication to connect to Blob Storage.
The 2 providers we register are:

  1. The managed identity one, for when the app runs on Azure.
  2. 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