Home » excel » Excel Power Query – Is it possible to connect to Azure Blob Storage with SAS authentication or Azure AD account

Excel Power Query – Is it possible to connect to Azure Blob Storage with SAS authentication or Azure AD account

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am accessing a container from a Azure Blob Storage with Excel, we connect through “New Query” but only gives the option to access with the Account Key.

enter image description here

After logging the permissions are saved in Data source setting with the Account Key.

To access that Azure Blob Storage from VBA is enough with the function from Power Query AzureStorage.Blobs (https://docs.microsoft.com/en-us/powerquery-m/azurestorage-blobs).

¿Is It possible to do the same with SAS (Shared Access Signature) Token or Azure AD account instead of using the Account Key? I’ve looking and found nothing at the moment

How to&Answers:

Yes, you could connect with sas, however it’s not data from azure, in my test it could work with from web.

I generate the sas url with read,write permissions and use HTTP protocol, then in the excel paste the url and replace https to http. Then you will be able to get the data.

enter image description here

enter image description here

If use Power Query, choose New Source-> Other Sources-> Web then it’s same with excel get data.