<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Azure on Hat Full of Data</title><link>https://hatfullofdata.blog/categories/azure/</link><description>Recent content in Azure on Hat Full of Data</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Thu, 21 Aug 2025 16:33:58 +0000</lastBuildDate><atom:link href="https://hatfullofdata.blog/categories/azure/index.xml" rel="self" type="application/rss+xml"/><item><title>Get Secret from Azure Key Vault in a Microsoft Fabric Notebook</title><link>https://hatfullofdata.blog/get-secret-from-azure-key-vault/</link><pubDate>Thu, 21 Aug 2025 16:33:55 +0000</pubDate><guid>https://hatfullofdata.blog/get-secret-from-azure-key-vault/</guid><description>&lt;img src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/cover.png" alt="Featured image of post Get Secret from Azure Key Vault in a Microsoft Fabric Notebook" /&gt;&lt;p&gt;I’ve recently been working with Notebooks in Microsoft Fabric and have needed to get a credentials information that should be kept secure. The obvious place to store such credentials is Azure Key Vault so now we need to get our secret from there.&lt;/p&gt;
&lt;p&gt;This is a really short post to help me out when I need a fast explanation on projects.&lt;/p&gt;
&lt;h2 id="azure-key-vault-part"&gt;Azure Key Vault Part
&lt;/h2&gt;&lt;p&gt;I’ve previously blogged how to setup a key vault and add a secret – &lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For this post I have a vault called LGB-Secrets and it has a secret called SPConnectorSecret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the Key Vault site showing the list of secrets." class="gallery-image" data-flex-basis="421px" data-flex-grow="175" height="387" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The vault URI is &lt;a class="link" href="https://lgb-secrets.vault.azure.net/" target="_blank" rel="noopener"
 &gt;https://lgb-secrets.vault.azure.net/&lt;/a&gt; which can be calculated from the vault name.&lt;/p&gt;
&lt;h2 id="python-to-get-secret-from-azure-key-vault"&gt;Python to Get Secret from Azure Key Vault
&lt;/h2&gt;&lt;p&gt;Notebookutils is a built in package for Microsoft Fabric notebooks. It was previously known as MSSparkUtils. It contains plenty of really useful methods to perform tasks with files, environments and credentials. Microsoft’s documentation can be found at :&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The method notebookutils.credentials.getSecret requires 2 parameters, vault URI and secret name. This code block looks like this.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_name = &amp;#34;lgb-secrets&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_secret_name = &amp;#34;SPConnectorSecret&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_url = f&amp;#34;https://{azure_key_vault_name}.vault.azure.net/&amp;#34; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;client_secret = notebookutils.credentials.getSecret(azure_key_vault_url,azure_key_vault_secret_name)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The account being used to run the notebook will need access to the key vault.&lt;/p&gt;
&lt;h2 id="reacted"&gt;Reacted!
&lt;/h2&gt;&lt;p&gt;The notebook understands that the value you fetched from the key vault should be kept secure. So if you try to print the client_secret it will not show you the result and will show REDACTED instead.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the result of a print client_secret and shows REDACTED" class="gallery-image" data-flex-basis="511px" data-flex-grow="213" height="319" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I know this is a very short post, which is a good thing as that means its a simple concept. It is here because I also wanted a short post that contains the code block I want to be able to copy and use easily.&lt;/p&gt;</description></item><item><title>Use Power Automate to Fetch Secrets from Key Vault</title><link>https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/</link><pubDate>Wed, 29 May 2024 08:34:09 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/cover.png" alt="Featured image of post Use Power Automate to Fetch Secrets from Key Vault" /&gt;&lt;p&gt;Once you have stored security details in Azure Key Vault as described in the previous post in this series (&lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-tenant-id-client-id-and-secret/" target="_blank" rel="noopener"
 &gt;Create Azure Key Vault to store Tenant ID, Client ID and Secret&lt;/a&gt;) you need a way to fetch secrets when you need them. Power Automate connector for Azure Key Vault includes the Get Secret action. This post shows you how to build a reusable child flow to fetch secrets.&lt;/p&gt;
&lt;p&gt;This post is part of &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="flow-design"&gt;Flow design
&lt;/h2&gt;&lt;p&gt;The flow we are going to create will be called by other flows, so is a child flow. The flow will have one parameter of the prefix of the ClientID and Secret store in the Azure Key Vault. If you have completed the previous post this would be PBI–Workspace. It will return 3 values, TenantID, ClientID and Secret which will be secured&lt;/p&gt;
&lt;p&gt;&lt;img alt="List of Secrets ib Azure Key Vault with names PBI-Workspace-ClientID and PBI-Workspace-Secret" class="gallery-image" data-flex-basis="519px" data-flex-grow="216" height="314" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Because we are using child flows we need to create our flows inside a solution. I recommend creating a solution for these group of flows. I don’t want to make this blog post even longer so please go google creating Power Platform solutions.&lt;/p&gt;
&lt;h2 id="setting-up-the-trigger"&gt;Setting up the Trigger
&lt;/h2&gt;&lt;p&gt;For a child flow we use a instant flow. Type in a descriptive name and select the trigger Manually trigger a flow. When you are in the flow editor, expand the trigger and add an input for the prefix. Adding hint text will help you and other users remember what the input is about.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="645px" data-flex-grow="268" height="253" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/flow-trigger.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-actions-to-fetch-secrets"&gt;Adding Actions to Fetch Secrets
&lt;/h2&gt;&lt;p&gt;The flow is reasonably simple with three repeating actions to fetch secrets. Add an action and search for Key Vault and select it. Then from the list select Get Secret. If this is the first time you have connected to a Key Vault you will need to type in the key vault name and click Sign in. Be aware that every key vault has its own connection.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Azure Key Vault connection setup showing Authentication Type drop down which can be left on default and place to type in Key Vault name" class="gallery-image" data-flex-basis="497px" data-flex-grow="207" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-13_20-45-20.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The action has a very simple drop down. For the TenantID action you can just select it from the drop down. For the ClientID and Secret we want to the prefix value from the trigger so that this flow is reusable. So for the ClientID and Secret select Enter custom value. Then use the dynamic value Prefix followed by -ClientID and -Secret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="three actions to fetch secrets from key vault" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="451" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-13_22-12-50-1.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="securing-the-secret-value"&gt;Securing the Secret Value
&lt;/h2&gt;&lt;p&gt;The secret value should be kept secret. So the Action output needs securing. Click on the ellipse (3 dots) on the Get secret – Secret action. Turn on the toggle for Secure Outputs and then click Done at the bottom of the dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Menu showing settings and settings with toggle for Secure Outputs turned on" class="gallery-image" data-flex-basis="500px" data-flex-grow="208" height="326" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_21-29-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This could be done on ClientID as well if required. Each action that has a security setting applied will show a padlock. When a flow run execution is looked at the value of the secret will not be available.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Action with a padlock and the executed action showing Content not shown due to security configuration" class="gallery-image" data-flex-basis="266px" data-flex-grow="111" height="612" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_21-47-17.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="returning-the-values"&gt;Returning the Values
&lt;/h2&gt;&lt;p&gt;The final part for this flow is to return the values. And for this flow to run as a child flow it must have a respond action. Click on add action and search for the Power Apps connector. It only one has one action Respond to a Power App or flow. Add three outputs to return TenantID, ClientID and Secret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power Apps connection showing Respond action and the action in the flow with three outputs" class="gallery-image" data-flex-basis="256px" data-flex-grow="106" height="636" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_22-13-18.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="handling-the-connections"&gt;Handling the Connections
&lt;/h2&gt;&lt;p&gt;When an instant flow runs the connections are usually based on who clicked the start on the flow. This does not work for a child flow, so a connection must be selected that will be used for when it runs.&lt;/p&gt;
&lt;p&gt;The changes need to be made from the flow details page, save and click the blue arrow in the top left to get there. Click on Edit in the Run only users box. When the pane appears, under connections used select a connection under Azure Key Vault. A message will appear to state users only get access in this flow, click OK to close it and then click Save to save the changes.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_22-39-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="testing-the-flow"&gt;Testing the flow
&lt;/h2&gt;&lt;p&gt;When you first write a child flow I suggest you write an instant flow to test it. The Run a Child Flow action only is available if your flows are in a solution. In order to protect the secret value you also need to protect the outputs of the Run a Child flow action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The flow with Manually trigger a flow trigger connected to Run a Child Flow action that is running Get Tenant and Secret with the parameter Prefix populated with PBI-Workspace" class="gallery-image" data-flex-basis="652px" data-flex-grow="272" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-05-29_09-17-35.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This tests that the flow runs a child flow and returns values even though we can’t see them.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;We now have an app that can fetch secrets, we’ve secured the authentication details and now written a flow to securely retrieve those values. Next step is to make sure Power BI will allow us to do this.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Create Azure Key Vault to store Tenant ID, Client ID and Secret</title><link>https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/</link><pubDate>Sat, 06 Apr 2024 20:14:00 +0000</pubDate><guid>https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/</guid><description>&lt;img src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/cover.png" alt="Featured image of post Create Azure Key Vault to store Tenant ID, Client ID and Secret" /&gt;&lt;p&gt;Azure Key Vault is a cloud service that provides a secure store for secrets. And in the previous post on creating &lt;a class="link" href="https://hatfullofdata.blog/create-a-power-bi-service-principle-profile/" target="_blank" rel="noopener"
 &gt;Power BI Service Principal Profile&lt;/a&gt; we added a secret. The Tenant ID, Client ID and Secret values give access to the Service Principal and whatever permission they have. So for that reason we are going to create an Azure Key Vault.&lt;/p&gt;
&lt;p&gt;This post is part of the &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-azure-key-vault"&gt;Create Azure Key Vault
&lt;/h2&gt;&lt;p&gt;The first step is to create the Azure Key Vault. Start at &lt;a class="link" href="https://portal.azure.com/" target="_blank" rel="noopener"
 &gt;https://portal.azure.com/&lt;/a&gt;. From the Home screen, navigate to all services and find Key Vaults. Once on the Key Vaults page click on Create to start the process. This will navigate you to a screen to select Subscription and Resource group. Key vaults do cost money, in my case
&lt;img alt="Steps to create an Azure Key Vault" class="gallery-image" data-flex-basis="442px" data-flex-grow="184" height="369" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-18_22-58-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-role-assignment"&gt;Add Role Assignment
&lt;/h2&gt;&lt;p&gt;Now we have create a new key vault to store our secrets the obvious place to go next is to Secrets. But if you take a look there you will see you do not have permission to play with secrets yet. And if you try to create one it will fail.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen shot showing the statement “You are unauthorized to view these contents”" class="gallery-image" data-flex-basis="491px" data-flex-grow="204" height="332" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_19-30-04.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You do have the rights to give yourself permission. On the left hand side menu, click on Access Control (IAM). Click on +Add and from the drop down options select Add role assignment.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Access control in the Key Vault" class="gallery-image" data-flex-basis="328px" data-flex-grow="136" height="497" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_20-04-04.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the next screen appears, we need to select a role based on Secrets. In the search box enter Secret and from the list select Key Vault Secrets Officer, that can read and write secrets. Click next to move to the Members tab. Click on + Select members and select yourself from the list and anyone else that needs access. When all the members are listed, click Review + Assign twice.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding members to the azure key vault role assignments" class="gallery-image" data-flex-basis="415px" data-flex-grow="173" height="393" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_20-18-23.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can look at the list of role assignments or click on Check my access for confirmation. If you want a user to be able to read the secrets but not write them you would pick Key Vault Reader.&lt;/p&gt;
&lt;h2 id="add-secrets"&gt;Add Secrets
&lt;/h2&gt;&lt;p&gt;When we now head to Secrets on the left hand menu, there are no warnings about being unauthorized. Click on + Generate/Import to open the Create a secret form. Upload can stay as Manual, enter in a name and the value. For naming I will use a common start for the Client ID and Secret so that in the flow in the next post I only need to ask for one parameter.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Steps to add a secret" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="346" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-25_14-16-37.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I also add a secret to store the Tenant ID. This probably doesn’t need to be as secure but it makes it easy if everything is in the same location.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I now have a key vault with 3 values. I can now use either environment variables or a flow to pull through the values. I can add more secrets to the vault for other Power BI actions.&lt;/p&gt;</description></item></channel></rss>