Showing results for 
Search instead for 
Did you mean: 
New Member

Connecting to Azure Blob Storage -- Key Vault

Hello All,

I am currently connecting my Power BI Desktop app to Azure blob storage by directly keying in the account key. For a safer approach, I would like to know...

1) if I can place the account key as a secret in Key Vault. If yes, could you provide the steps to call/refer the key vault in the Power BI app 

2) if I can used a SAS (Shared Access Signature)..If yes, could you provide the steps to call/refer the SAS value in the Power BI app 





Frequent Visitor

There is no native way to call Azure Key Vault from Power BI, so you would need to call the API, creating the conundrom that to authenticate to Key Vault API, you need to store authentication details.


I have a solution whereby I created a Power BI Dataflow, which returns the SAS Token. The Dataflow is in a locked-down workspace & thus only accessible by trusted users. The M-code does not have the SAS Token in clear text, but is base64 encoded. This is not secure in any way but gives a very small additional obfuscation layer.


Then every single Power BI report that connects to the Azure storage uses the Dataflow to retrieve the token. This means I can change the token in one place when needs be, and all Power BI reports will continue to run smoothly. Anyone can publish, then the credentials to the Power BI dataflow are updated to use a trusted account.


This is not a fool proof & highly secure method, so please use at your own discretion.


Here is an example of the M query in my SAS Token dataflow:


  EncodedToken = "ABC123-BASE64-ENCODED-TEXT-ABC123",
  DecodedToken = Lines.FromBinary(Binary.FromText(EncodedToken, BinaryEncoding.Base64), nullnull1252){0},
  ConvertToTable = Table.FromValue(DecodedToken)

Thanks Ben..

Community Support
Community Support

Hi, @maheshssm 

Please check if these related documents could help:




Best Regards,
Community Support Team _ Eason

Hi Eason,

Thanks for providing the links !

I have already gone through these links and other similar articles from Microsoft (and community forums), but with no success. My requirement is to see if there is an article or sample code snippet to be used in Power BI to call the account key. (I am assuming it would need to be written in the Power Query editor, as I have not been able to locate other settings).



Helpful resources

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors