cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 

 

Thanks!


Regards

Mahesh

4 REPLIES 4
BenWatt
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:

 

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

Thanks Ben..

v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Please check if these related documents could help:

service-encryption-byok 

key-vault/secrets/overview-storage-keys 

storage-keys-sas-tokens-code 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

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).

 

Thanks.

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors