<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Key Vault Archives - AzureOps</title>
	<atom:link href="https://azureops.org/articles/category/azure/key-vault/feed/" rel="self" type="application/rss+xml" />
	<link>https://azureops.org/articles/category/azure/key-vault/</link>
	<description>Notable things about Cloud, Data and DevOps.</description>
	<lastBuildDate>Sun, 12 Oct 2025 08:16:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/azureops.org/wp-content/uploads/2021/04/cropped-android-chrome-512x512-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>Key Vault Archives - AzureOps</title>
	<link>https://azureops.org/articles/category/azure/key-vault/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">190208641</site>	<item>
		<title>Access Key Vault from Azure DevOps Pipeline</title>
		<link>https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/</link>
		
		<dc:creator><![CDATA[Kunal Rathi]]></dc:creator>
		<pubDate>Fri, 22 Mar 2024 20:00:18 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Key Vault]]></category>
		<category><![CDATA[azure devops pipelines]]></category>
		<category><![CDATA[key vault secrets]]></category>
		<category><![CDATA[Microsoft Entra]]></category>
		<guid isPermaLink="false">https://azureops.org/?p=7505</guid>

					<description><![CDATA[<p>When setting up deployment pipelines in Azure DevOps, sometimes you need to get secret information stored in Azure Key Vault. This article describes how to access Key Vault from your Azure DevOps Pipelines. It&#8217;s all about keeping sensitive data safe and making your deployment process smooth and reliable. Let&#8217;s dive in! Pre-requisites:1. Azure DevOps project [&#8230;]</p>
<p>The post <a href="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/">Access Key Vault from Azure DevOps Pipeline</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">When setting up deployment pipelines in Azure DevOps, sometimes you need to get secret information stored in Azure Key Vault. This article describes how to access Key Vault from your Azure DevOps Pipelines. It&#8217;s all about keeping sensitive data safe and making your deployment process smooth and reliable. Let&#8217;s dive in!</p>



<p class="has-pale-cyan-blue-background-color has-background"><strong>Pre-requisites:</strong><br>1. Azure DevOps project and a key vault.<br>2. Permission to access Microsoft Entra ID applications.</p>



<h2 class="wp-block-heading">What is Azure DevOps project service principal?</h2>



<p class="">To know the service principle (entra application ID) associated with Azure DevOps project </p>



<p class="">1. navigate to &#8216;Project Settings&#8217; &#8211; &gt; &#8216;Service connections&#8217;.</p>



<p class="">2. Open any service connection and click on the &#8216;Manage Service Principal&#8217; link as shown in the image below.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?ssl=1"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="760" height="384" data-attachment-id="7508" data-permalink="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/manage-service-principal/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?fit=760%2C384&amp;ssl=1" data-orig-size="760,384" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Manage-service-principal" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?fit=760%2C384&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?resize=760%2C384&#038;ssl=1" alt="" class="wp-image-7508" style="width:598px;height:auto" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?w=760&amp;ssl=1 760w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?resize=300%2C152&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?resize=450%2C227&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Manage-service-principal.png?resize=600%2C303&amp;ssl=1 600w" sizes="(max-width: 760px) 100vw, 760px" /></a></figure>



<p class="">3. This will open the Microsoft Entra ID application associated with the DevOps project in Azure portal. </p>



<figure class="wp-block-image size-full is-resized"><a href="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?ssl=1"><img data-recalc-dims="1" decoding="async" width="940" height="439" data-attachment-id="7509" data-permalink="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/azure-devops-project-entra-id-application/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?fit=940%2C439&amp;ssl=1" data-orig-size="940,439" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Azure-DevOps-project-entra-id-application" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?fit=940%2C439&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?resize=940%2C439&#038;ssl=1" alt="Access Key Vault from Azure DevOps Pipeline - View DevOps project Application ID" class="wp-image-7509" style="width:679px;height:auto" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?w=940&amp;ssl=1 940w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?resize=300%2C140&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?resize=768%2C359&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?resize=450%2C210&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Azure-DevOps-project-entra-id-application.png?resize=600%2C280&amp;ssl=1 600w" sizes="(max-width: 940px) 100vw, 940px" /></a></figure>



<p class="">4. Note the Application (client) ID. This is the application ID to which we would need to grant access to Azure key vault.</p>



<figure class="is-style-default wp-block-image size-large is-resized"><a href="https://marketplace.visualstudio.com/items?itemName=AzureOps.ssiscatalogerpro&amp;ssr=false#overview" target="_blank" rel="noopener"><img data-recalc-dims="1" decoding="async" width="1200" height="148" data-attachment-id="4839" data-permalink="https://azureops.org/articles/azure-data-studio-for-sql-developers/scmw-horizontal-ad/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1326%2C163&amp;ssl=1" data-orig-size="1326,163" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SCMW-horizontal-ad" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1200%2C148&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&#038;ssl=1" alt="" class="wp-image-4839" style="object-fit:cover;width:811px;height:99px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=450%2C55&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=600%2C74&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=300%2C37&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=768%2C94&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?w=1326&amp;ssl=1 1326w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></figure>



<h2 class="wp-block-heading">Grant access to Azure DevOps application ID on Azure key vault</h2>



<p class="">1. Navigate to the key vault in Azure <a href="https://portal.azure.com/#home" target="_blank" rel="noreferrer noopener">portal </a>that you want to access in Azure DevOps project pipelines. </p>



<p class="">2. Click on &#8216;Access policies&#8217; on the left side navigation list and click &#8216;Create&#8217; to create a new access policy.</p>



<p class="">3. Select the required permissions for the pipeline and Click &#8216;Next&#8217;.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="806" height="384" data-attachment-id="7512" data-permalink="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/select-key-vault-access-level/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?fit=806%2C384&amp;ssl=1" data-orig-size="806,384" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Select-key-vault-access-level" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?fit=806%2C384&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?resize=806%2C384&#038;ssl=1" alt="" class="wp-image-7512" style="width:605px;height:auto" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?w=806&amp;ssl=1 806w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?resize=300%2C143&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?resize=768%2C366&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?resize=450%2C214&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Select-key-vault-access-level.png?resize=600%2C286&amp;ssl=1 600w" sizes="(max-width: 806px) 100vw, 806px" /></a></figure>



<p class="">4. Search for the application ID (from the previous section) and select the application.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="597" height="349" data-attachment-id="7513" data-permalink="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/search-microsoft-graph-for-application-id-in-azure-key-vault/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?fit=597%2C349&amp;ssl=1" data-orig-size="597,349" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Search-Microsoft-graph-for-application-id-in-Azure-key-vault" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?fit=597%2C349&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?resize=597%2C349&#038;ssl=1" alt="Access Key Vault from Azure DevOps Pipeline" class="wp-image-7513" style="width:522px;height:auto" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?w=597&amp;ssl=1 597w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?resize=300%2C175&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/Search-Microsoft-graph-for-application-id-in-Azure-key-vault.png?resize=450%2C263&amp;ssl=1 450w" sizes="(max-width: 597px) 100vw, 597px" /></a></figure>



<p class="">5. Authorise the app to perform the specified permissions on the User&#8217;s or Group&#8217;s behalf.</p>



<p class="">6. &#8216;Review&#8217; the steps and click &#8221;Create&#8217; to grant access to the DevOps project on Azure key vault.</p>



<h2 class="wp-block-heading">Access the key vault secrets in Azure DevOps YAML pipeline</h2>



<p class="">Once the access is set up, you can add a Azure Key Vault Task in your YAML pipeline to access key vault secrets. </p>



<figure class="wp-block-image size-full is-resized"><a href="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="366" height="422" data-attachment-id="7558" data-permalink="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/add-a-new-key-vault-task-in-yaml-pipeline/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?fit=366%2C422&amp;ssl=1" data-orig-size="366,422" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="add-a-new-key-vault-task-in-YAML-pipeline" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?fit=366%2C422&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?resize=366%2C422&#038;ssl=1" alt="Add Azure key vault task in Azure DevOps YAML pipeline." class="wp-image-7558" style="width:270px;height:auto" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?w=366&amp;ssl=1 366w, https://i0.wp.com/azureops.org/wp-content/uploads/2024/03/add-a-new-key-vault-task-in-YAML-pipeline.png?resize=260%2C300&amp;ssl=1 260w" sizes="(max-width: 366px) 100vw, 366px" /></a></figure>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
          - task: AzureKeyVault@1
            inputs:
              azureSubscription: &#039;service-connection-name&#039;
              KeyVaultName: &#039;key-vault-name&#039;
              SecretsFilter: &#039;secret1,secret2&#039;
              RunAsPreJob: true
</pre></div>


<p class="has-background" style="background-color:#bcefca"><strong>Pro tips:</strong><br>1.  <a href="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/" target="_blank" rel="noreferrer noopener">Learn</a> how to access Key Vault secrets in Azure Data Factory.</p>



<h2 class="wp-block-heading">See more</h2>



<iframe width="700" height="394" src="https://www.youtube.com/embed/t2h6xNVFQkc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="is-style-fill wp-block-button"><a class="wp-block-button__link has-white-color has-blush-light-purple-gradient-background has-text-color has-background has-link-color wp-element-button" href="https://azureops.org/product/ssis-catalog-migration-wizard-pro/" target="_blank" rel="noreferrer noopener">Download Now</a></div>
</div>
<p>The post <a href="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/">Access Key Vault from Azure DevOps Pipeline</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7505</post-id>	</item>
		<item>
		<title>Update Secret in Azure Key Vault using PowerShell</title>
		<link>https://azureops.org/articles/update-secret-in-azure-key-vault-using-powershell/</link>
		
		<dc:creator><![CDATA[Kunal Rathi]]></dc:creator>
		<pubDate>Wed, 26 Jul 2023 06:20:24 +0000</pubDate>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Key Vault]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Azure key vault]]></category>
		<guid isPermaLink="false">https://azureops.org/?p=4667</guid>

					<description><![CDATA[<p>This article describes how to update secret in azure key vault using PowerShell using AAD and managed identity authentication.</p>
<p>The post <a href="https://azureops.org/articles/update-secret-in-azure-key-vault-using-powershell/">Update Secret in Azure Key Vault using PowerShell</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class=""><a href="https://learn.microsoft.com/en-us/azure/key-vault/general/basic-concepts" target="_blank" rel="noreferrer noopener">Azure Key Vault</a> is a cloud service that helps store and securely access secrets. The secret could be anything we want to secure, like API keys, credentials, etc. It provides data encryption when moving from a key vault to a client application, making it more secure. It is possible to get and set key vault secrets programmatically. This article describes how to Update secret in Azure Key Vault using PowerShell.</p>



<p class="has-pale-cyan-blue-background-color has-background"><strong>Pre-requisites</strong>:<br>1. <a href="https://learn.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-10.3.0" target="_blank" rel="noreferrer noopener">Azure Az PowerShell module</a> installed and you have the appropriate permissions to access and modify the Azure Key Vault. <br>2. Azure key vault with appropriate permissions.</p>



<h2 class="wp-block-heading"> Update key vault secrets using PowerShell</h2>



<p class="">Run below PowerShell command in any editor like PowerShell ISE.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; gutter: false; title: ; notranslate">
$azureTenantId = &quot;tenantid&quot;
$subscriptionId = &quot;subscriptionId&quot;
$keyVaultName = &quot;vaultname&quot;
&quot;&#039;Log in to Azure...&quot;
Connect-AzAccount -Tenant $azureTenantId  -Subscription $subscriptionId
Set-AzContext -TenantId $azureTenantId
$secretAccessKeyID = Set-AzKeyVaultSecret -VaultName $keyVaultName -Name &lt;key name&gt; -SecretValue &lt;secret value&gt; 
</pre></div>


<p class="">Here, </p>



<p class=""><code>Connect-AzAccount -Tenant $azureTenantId -Subscription $subscriptionId</code><br>This cmdlet connects to your Azure account using the specified Azure Tenant ID and Subscription ID. It initiates an authentication process to sign in to Azure.</p>



<p class=""><code>Set-AzContext -TenantId $azureTenantId</code><br>This cmdlet sets the context for the current session to the specified Azure Tenant ID. It ensures that it can perform subsequent operations in the context of the specified Azure tenant.</p>



<p class=""><code>$secretAccessKeyID = Set-AzKeyVaultSecret -VaultName $keyVaultName -Name &lt;key name&gt; -SecretValue &lt;secret value&gt;</code><br>This line updates a secret in the Azure Key Vault specified by <code>$keyVaultName</code>. It uses the <code>Set-AzKeyVaultSecret</code> cmdlet to perform this task. Replace <code>&lt;key name&gt;</code> with the name of the secret you want to update, and <code>&lt;secret value&gt;</code> with the new value for the secret.</p>



<h2 class="wp-block-heading"> Update secret in azure key vault using managed identity</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; gutter: false; title: ; notranslate">
$azureTenantId =  &quot;tenantid&quot;
$keyVaultName = &quot;vaultname&quot;
&quot;&#039;Log in to Azure…&quot;
Connect-AzAccount -Identity
Set-AzContext -TenantId $azureTenantId
$secretAccessKeyID = Set-AzKeyVaultSecret -VaultName $keyVaultName -Name &lt;key name&gt; -SecretValue &lt;secret value&gt; 
</pre></div>


<figure class="is-style-default wp-block-image size-large is-resized"><a href="https://marketplace.visualstudio.com/items?itemName=AzureOps.ssiscatalogerpro&amp;ssr=false#overview" target="_blank" rel="noopener"><img data-recalc-dims="1" decoding="async" width="1200" height="148" data-attachment-id="4839" data-permalink="https://azureops.org/articles/azure-data-studio-for-sql-developers/scmw-horizontal-ad/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1326%2C163&amp;ssl=1" data-orig-size="1326,163" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SCMW-horizontal-ad" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1200%2C148&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&#038;ssl=1" alt="" class="wp-image-4839" style="object-fit:cover;width:811px;height:99px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=450%2C55&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=600%2C74&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=300%2C37&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=768%2C94&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?w=1326&amp;ssl=1 1326w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></figure>



<p class="">Here,</p>



<p class=""><code>Connect-AzAccount -Identity</code><br>To connect to Azure, this command uses the Managed Service Identity (MSI) of the current environment where the script is running. With MSI, you can access Azure resources without the need for explicit credentials in the code. However, it is important to note that this requires the environment to have a system-assigned or user-assigned managed identity with the necessary permissions to access the Azure Key Vault.</p>



<p class=""><code>Set-AzContext -TenantId $azureTenantId</code><br>This cmdlet sets the context for the current session to the specified Azure Tenant ID. It ensures that subsequent operations are performed in the context of the specified Azure tenant. The value for <code>$azureTenantId</code> was retrieved from the Azure Automation variable.</p>



<p class=""><code>$secretAccessKeyID = Set-AzKeyVaultSecret -VaultName $keyVaultName -Name &lt;key name&gt; -SecretValue &lt;secret value&gt;</code><br>This line updates a secret in the Azure Key Vault specified by <code>$keyVaultName</code>. It uses the <code>Set-AzKeyVaultSecret</code> cmdlet to perform this task. Replace <code>&lt;key name&gt;</code> with the name of the secret you want to update, and <code>&lt;secret value&gt;</code> with the new value for the secret.</p>



<p class="has-background" style="background-color:#bcefca"><strong>Pro tips:</strong><br>1. Be cautious while updating secrets; they are sensitive information and should be handled securely.<br>2. While we can only change secret attributes such as expiration date, activation date. However, we can add a new version of the existing secret<br>3. Follow <a href="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/" target="_blank" rel="noreferrer noopener">this</a> article if you want to learn how to access key vault secrets in Azure Data Factory.</p>



<h2 class="wp-block-heading">See more</h2>



<iframe width="700" height="394" src="https://www.youtube.com/embed/t2h6xNVFQkc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="is-style-fill wp-block-button"><a class="wp-block-button__link has-white-color has-blush-light-purple-gradient-background has-text-color has-background has-link-color wp-element-button" href="https://azureops.org/product/ssis-catalog-migration-wizard-pro/" target="_blank" rel="noreferrer noopener">Download Now</a></div>
</div>



<p class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>The post <a href="https://azureops.org/articles/update-secret-in-azure-key-vault-using-powershell/">Update Secret in Azure Key Vault using PowerShell</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4667</post-id>	</item>
		<item>
		<title>Recover Deleted Key Vault in Azure</title>
		<link>https://azureops.org/articles/recover-deleted-key-vault/</link>
		
		<dc:creator><![CDATA[Kunal Rathi]]></dc:creator>
		<pubDate>Thu, 06 Oct 2022 20:12:04 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Key Vault]]></category>
		<category><![CDATA[key vault recovery]]></category>
		<category><![CDATA[recover deleted key vault]]></category>
		<guid isPermaLink="false">https://azureops.org/?p=3842</guid>

					<description><![CDATA[<p>Have you accidentally deleted Key Vault from the resource group? In this article, we will see how to recover deleted key vault in Azure using the Azure Az PowerShell cmdlet.</p>
<p>The post <a href="https://azureops.org/articles/recover-deleted-key-vault/">Recover Deleted Key Vault in Azure</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Azure Key Vault is a cloud service that helps store and securely access secrets. The secret could be anything we want to secure, like API keys, credentials, etc. It provides data encryption when it’s moving from a key vault to a client application, making it more secure. <strong>Have you accidentally deleted Key Vault from the resource group</strong>? In this article, we will see how to recover deleted key vault in Azure using the Azure Az PowerShell cmdlet.</p>



<p class="has-pale-cyan-blue-background-color has-background"><strong>Pre-requisites</strong><br>1. Azure subscription with access to deploy Azure resources.<br>2. Az PowerShell <a href="https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.1.0" target="_blank" rel="noreferrer noopener">module</a> installed on the local machine.<br>3. Azure Key Vault soft-delete should be enabled on the vaults to be recovered.</p>



<h2 class="wp-block-heading">What is a key vault soft delete?</h2>



<p>Key vault&#8217;s soft delete feature enables the recovery of deleted vaults and deleted key vault objects (like keys, secrets, and certificates),  Microsoft Azure retains soft-deleted key vault for a specified period (90 days by default). The service further provides a mechanism to recover the deleted object. Read more about it <a href="https://learn.microsoft.com/en-us/azure/key-vault/general/soft-delete-overview" target="_blank" rel="noreferrer noopener">here</a>.</p>



<h2 class="wp-block-heading">How to restore a deleted key vault?</h2>



<p>Follow the below three steps to recover the deleted Key Vault in Azure using the Az PowerShell module.</p>



<h3 class="wp-block-heading">1. Connect to the Azure account</h3>



<p>Execute the below command in PowerShell to connect to a specific Azure Tenant.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; title: ; notranslate">
Connect-AzAccount
</pre></div>


<figure class="wp-block-image size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="601" data-attachment-id="3849" data-permalink="https://azureops.org/articles/recover-deleted-key-vault/connect-azaccount/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?fit=1200%2C601&amp;ssl=1" data-orig-size="1200,601" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Connect-AzAccount" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?fit=1200%2C601&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?resize=1200%2C601&#038;ssl=1" alt="" class="wp-image-3849" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?w=1200&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?resize=450%2C225&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?resize=600%2C301&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?resize=300%2C150&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/Connect-AzAccount.gif?resize=768%2C385&amp;ssl=1 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<h3 class="wp-block-heading">2. Check what key vaults are eligible for recovery</h3>



<p>Let us now check what Azure Key Vaults are eligible for recovery from the deleted state. The below command will list down all the soft deleted key vaults in the last 90 days. Specify <code>VaultName</code> parameter to check a specific key vault for recovery or specify <code>Location</code> parameter to check all eligible vaults from a particular location within the logged-in Tenant. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; title: ; notranslate">
Get-AzKeyVault -InRemovedState
</pre></div>


<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="256" data-attachment-id="3854" data-permalink="https://azureops.org/articles/recover-deleted-key-vault/recover-key-vault-get-azkeyvault-inremovedstate-1/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?fit=1360%2C290&amp;ssl=1" data-orig-size="1360,290" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="recover-key-vault-Get-AzKeyVault-InRemovedState-1" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?fit=1200%2C256&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=1200%2C256&#038;ssl=1" alt="" class="wp-image-3854" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=1200%2C256&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=450%2C96&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=600%2C128&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=300%2C64&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?resize=768%2C164&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Get-AzKeyVault-InRemovedState-1.png?w=1360&amp;ssl=1 1360w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<h3 class="wp-block-heading">3. Undo key vault deletion</h3>



<p>Run the below command to recover a specific soft deleted key vault from a particular location and resource group.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; title: ; notranslate">
Undo-AzKeyVaultRemoval -VaultName VaultName -ResourceGroupName ResourceGroupName -Location Location
</pre></div>


<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="459" data-attachment-id="3851" data-permalink="https://azureops.org/articles/recover-deleted-key-vault/recover-key-vault-undo-azkeyvaultremoval/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?fit=1915%2C733&amp;ssl=1" data-orig-size="1915,733" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="recover-key-vault-Undo-AzKeyVaultRemoval" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?fit=1200%2C459&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=1200%2C459&#038;ssl=1" alt="Recover deleted Key Vault in Azure" class="wp-image-3851" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=1200%2C459&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=450%2C172&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=600%2C230&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=300%2C115&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=768%2C294&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?resize=1536%2C588&amp;ssl=1 1536w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/10/recover-key-vault-Undo-AzKeyVaultRemoval.png?w=1915&amp;ssl=1 1915w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<p>We have just seen how to recover a deleted key vault in Azure. </p>



<figure class="is-style-default wp-block-image size-large is-resized"><a href="https://marketplace.visualstudio.com/items?itemName=AzureOps.ssiscatalogerpro&amp;ssr=false#overview" target="_blank" rel="noopener"><img data-recalc-dims="1" decoding="async" width="1200" height="148" data-attachment-id="4839" data-permalink="https://azureops.org/articles/azure-data-studio-for-sql-developers/scmw-horizontal-ad/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1326%2C163&amp;ssl=1" data-orig-size="1326,163" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SCMW-horizontal-ad" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1200%2C148&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&#038;ssl=1" alt="" class="wp-image-4839" style="object-fit:cover;width:811px;height:99px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=450%2C55&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=600%2C74&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=300%2C37&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=768%2C94&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?w=1326&amp;ssl=1 1326w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></figure>



<h2 class="wp-block-heading">How to recover deleted key vault objects?</h2>



<p>Follow below quick steps to recover soft deleted key vault keys, secrets, or certificates.</p>



<ol class="wp-block-list">
<li>Log in to the <a href="https://portal.azure.com/#home" target="_blank" rel="noreferrer noopener">Azure portal</a>.</li>



<li>Navigate to the key vault containing soft-deleted secrets, keys, or certificates.</li>



<li>Select the blade corresponding to the secret type you want to manage (keys, secrets, or certificates).</li>



<li>At the top of the screen, click on &#8220;Manage deleted (keys, secrets, or certificates).</li>



<li>A context pane will appear on the right side of your screen.</li>



<li>Select the secret, key, or certificate you want to recover and select the recovery option.</li>
</ol>



<h2 class="wp-block-heading">How to enable secrets in key vault</h2>



<p>In case the secret in the key vault is disabled and you want to enable it. Right click on the secret and click Enable.</p>



<p class="has-background" style="background-color:#bcefca"><strong>Pro tips:</strong><br>1. If you also have deleted the resource group along with the Key Vault, you would need to create the resource group with the same name before recovering the Key Vault.<br>2. Soft-Delete feature in Azure Key-Vault would be compulsory by February 2025.</p>



<p>We have seen steps we can follow for azure key vault recovery.</p>



<h2 class="wp-block-heading">See more</h2>



<iframe width="700" height="394" src="https://www.youtube.com/embed/t2h6xNVFQkc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="is-style-fill wp-block-button"><a class="wp-block-button__link has-white-color has-blush-light-purple-gradient-background has-text-color has-background has-link-color wp-element-button" href="https://azureops.org/product/ssis-catalog-migration-wizard-pro/" target="_blank" rel="noreferrer noopener">Download Now</a></div>
</div>
<p>The post <a href="https://azureops.org/articles/recover-deleted-key-vault/">Recover Deleted Key Vault in Azure</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3842</post-id>	</item>
		<item>
		<title>Databricks Secret Scopes – How to Create, Manage, and Use Securely</title>
		<link>https://azureops.org/articles/manage-secret-scopes-in-databricks-using-gui/</link>
		
		<dc:creator><![CDATA[Pavan Bangad]]></dc:creator>
		<pubDate>Wed, 14 Sep 2022 20:42:54 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Databricks]]></category>
		<category><![CDATA[Key Vault]]></category>
		<category><![CDATA[Databricks secret scopes]]></category>
		<category><![CDATA[Secret scropes in Databricks]]></category>
		<guid isPermaLink="false">https://azureops.org/?p=3266</guid>

					<description><![CDATA[<p>Databricks platform is used to connect to multiple applications. Databricks requires credentials or secrets to connect to these applications. Databricks or Azure Key Vault can store these secrets securely. Secret scopes are used to manage the secrets which are stored in Azure Key Vault or Databricks.</p>
<p>The post <a href="https://azureops.org/articles/manage-secret-scopes-in-databricks-using-gui/">Databricks Secret Scopes – How to Create, Manage, and Use Securely</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">Databricks is a unified big data processing and analytics cloud platform that transforms and processes huge volumes of data. Apache Spark is the building block of Databricks, an in-memory analytics engine for big data and machine learning. Databricks can connect to various sources for data ingestion. This article describes how to manage secret scopes in Databricks using GUI.</p>



<p class="has-pale-cyan-blue-background-color has-background"><strong>Pre-requisites</strong>:<br>To mount a location, you would need:<br>1. Databricks service in Azure, GCP, or AWS cloud.<br>2. A Databricks cluster.<br>3. Azure subscription with Azure Key Vault service created.</p>



<h2 class="wp-block-heading">What are Secret scopes in Databricks?</h2>



<p class="">When working with various applications, the Databricks platform comes in handy. To establish connections, credentials or secrets are necessary, which can be securely stored in Databricks or Azure Key Vault. Secret scopes are responsible for managing these secrets in either Azure Key Vault or Databricks.y Vault or Databricks.y Vault or Databricks.</p>



<p class=""><strong>Databricks supports two secret scopes :</strong><br>1. <a href="https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts" target="_blank" rel="noreferrer noopener">Azure Key Vault</a> backed scopes: to manage secrets stored in the Azure Key Vault.<br>2. Databricks-backed scopes: to manage secrets stored in Databricks.</p>



<h2 class="wp-block-heading">Secret Scopes vs Key Vault-Backed Scopes</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Feature</th><th>Secret Scope</th><th>Key Vault-Backed Scope</th></tr></thead><tbody><tr><td>Storage</td><td>Stored inside Databricks workspace</td><td>Stored in Azure Key Vault</td></tr><tr><td>Security</td><td>Basic workspace-level</td><td>Enterprise-grade (RBAC + auditing)</td></tr><tr><td>Ideal For</td><td>Simpler, internal use</td><td>Production, regulated environments</td></tr><tr><td>Creation</td><td><code>databricks secrets create-scope</code></td><td>Linked via Azure Key Vault URI</td></tr></tbody></table></figure>



<p class="">This article will focus on how to manage Azure Key Vault-backed secret scopes.</p>



<h2 class="wp-block-heading">Create an Azure Key Vault-backed scope</h2>



<p class="">Follow the below steps to create an Azure Key Vault-backed secret scope.</p>



<p class="">1. Open <code>https://&lt;databricks-instance&gt;#secrets/createScope</code> URL</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="864" data-attachment-id="3476" data-permalink="https://azureops.org/articles/manage-secret-scopes-in-databricks-using-gui/1-open-url/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?fit=1366%2C984&amp;ssl=1" data-orig-size="1366,984" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1.-open-url" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?fit=1200%2C864&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=1200%2C864&#038;ssl=1" alt="Manage Secret Scopes in Databricks" class="wp-image-3476" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=1200%2C864&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=450%2C324&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=600%2C432&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=300%2C216&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=861%2C620&amp;ssl=1 861w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?resize=768%2C553&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/1.-open-url.jpg?w=1366&amp;ssl=1 1366w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<p class="has-text-align-left">2. Provide the below details:</p>



<p class=""><strong>Scope Name: </strong>&lt;Name of the scope&gt;</p>



<p class=""><strong>Manage Principal:</strong> Using this option, you can specify what all users can manage the secret scope. You can either select &#8220;All Users&#8221; or &#8220;Create&#8217;.</p>



<p class=""><strong>DNS Name and Resource ID:</strong> Both these properties can be found in Azure Key Vault service properties.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="310" data-attachment-id="3477" data-permalink="https://azureops.org/articles/manage-secret-scopes-in-databricks-using-gui/key-vault-properties/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?fit=1540%2C398&amp;ssl=1" data-orig-size="1540,398" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="key-vault-properties" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?fit=1200%2C310&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=1200%2C310&#038;ssl=1" alt="key vault service properties." class="wp-image-3477" style="width:854px;height:221px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=1200%2C310&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=450%2C116&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=600%2C155&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=300%2C78&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=768%2C198&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?resize=1536%2C397&amp;ssl=1 1536w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/09/key-vault-properties.jpg?w=1540&amp;ssl=1 1540w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<p class="">3. Click on Create. This will create secret scope.</p>



<h2 class="wp-block-heading">Access a secret from the Azure Key Vault in Databricks</h2>



<p class="">We can access secrets in Databricks using the below command.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; gutter: false; title: ; notranslate">
password =  dbutils.secrets.get(scope = &lt;name_of_scope&gt;, key = &quot;&lt;name_of_secret&gt;)
</pre></div>


<figure class="is-style-default wp-block-image size-large is-resized"><a href="https://marketplace.visualstudio.com/items?itemName=AzureOps.ssiscatalogerpro&amp;ssr=false#overview" target="_blank" rel="noopener"><img data-recalc-dims="1" decoding="async" width="1200" height="148" data-attachment-id="4839" data-permalink="https://azureops.org/articles/azure-data-studio-for-sql-developers/scmw-horizontal-ad/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1326%2C163&amp;ssl=1" data-orig-size="1326,163" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SCMW-horizontal-ad" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1200%2C148&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&#038;ssl=1" alt="" class="wp-image-4839" style="object-fit:cover;width:811px;height:99px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=450%2C55&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=600%2C74&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=300%2C37&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=768%2C94&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?w=1326&amp;ssl=1 1326w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></figure>



<h2 class="wp-block-heading">Delete a secret scope from Databricks</h2>



<p class="">Unfortunately, it is not possible to delete a secret scope using GUI. The alternative option is to use either Databricks CLI or Databricks Rest API for deletion. </p>



<h2 class="wp-block-heading">FAQ</h2>


<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-5fa68f8b uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-true uagb-faq-inactive-other-true uagb-faq__wrap uagb-buttons-layout-wrap uagb-faq-equal-height     " data-faqtoggle="true" role="tablist"><div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-c9ebda65 " role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions">			<span class="uagb-icon uagb-faq-icon-wrap">
								<svg xmlns="https://www.w3.org/2000/svg" viewBox= "0 0 448 512"><path d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"></path></svg>
							</span>
						<span class="uagb-icon-active uagb-faq-icon-wrap">
								<svg xmlns="https://www.w3.org/2000/svg" viewBox= "0 0 448 512"><path d="M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z"></path></svg>
							</span>
			<span class="uagb-question">1. How to view secret scope values in Databricks?</span></div><div class="uagb-faq-content"><p>You cannot view actual secret values for security reasons. However, you can list the scope name and keys using: databricks secrets list &#8211;scope my-scope</p></div></div><div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-e2e1e957 " role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions">			<span class="uagb-icon uagb-faq-icon-wrap">
								<svg xmlns="https://www.w3.org/2000/svg" viewBox= "0 0 448 512"><path d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"></path></svg>
							</span>
						<span class="uagb-icon-active uagb-faq-icon-wrap">
								<svg xmlns="https://www.w3.org/2000/svg" viewBox= "0 0 448 512"><path d="M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z"></path></svg>
							</span>
			<span class="uagb-question">Can I delete a Databricks secret scope?</span></div><div class="uagb-faq-content"><p>Yes, using: databricks secrets delete-scope &#8211;scope my-scope</p></div></div></div>


<p class="has-background" style="background-color:#bcefca"><strong>Pro tips:</strong><br>1. Databricks provides a free community version where you can learn and explore Databricks. You can signup here.<br>2. By managing secret scopes in Databricks, you can keep your sensitive data secure while allowing authorized users and applications to access it when needed.<br>3. If you&#8217;re aiming to obtain the Databricks certified Data Engineer Associate certification, take a look at these helpful tips.<br>4. Learn how to mount and unmount data lake gen2 storage in Databricks.<br>5. <a href="https://azureops.org/articles/automate-databricks-infrastructure-as-code-with-terraform/" target="_blank" rel="noreferrer noopener">Learn</a> how to automate Databricks IAAC using Terraform.</p>



<iframe width="700" height="394" src="https://www.youtube.com/embed/t2h6xNVFQkc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="is-style-fill wp-block-button"><a class="wp-block-button__link has-white-color has-blush-light-purple-gradient-background has-text-color has-background has-link-color wp-element-button" href="https://azureops.org/product/ssis-catalog-migration-wizard-pro/" target="_blank" rel="noreferrer noopener">Download Now</a></div>
</div>
<p>The post <a href="https://azureops.org/articles/manage-secret-scopes-in-databricks-using-gui/">Databricks Secret Scopes – How to Create, Manage, and Use Securely</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3266</post-id>	</item>
		<item>
		<title>Use Key Vault Secrets in Azure Data Factory</title>
		<link>https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/</link>
		
		<dc:creator><![CDATA[Pavan Bangad]]></dc:creator>
		<pubDate>Fri, 13 May 2022 12:52:36 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Data Factory]]></category>
		<category><![CDATA[Key Vault]]></category>
		<category><![CDATA[adf get secret from key vault]]></category>
		<category><![CDATA[azure data factory key vault]]></category>
		<category><![CDATA[azure key vault linked service]]></category>
		<guid isPermaLink="false">https://azureops.org/?p=2239</guid>

					<description><![CDATA[<p>To secure connection details in data factory, we can store credentials in the Azure key vault and access them in Azure data factory. This article describes how to access Azure key vault secrets from Azure data factory linked services.</p>
<p>The post <a href="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/">Use Key Vault Secrets in Azure Data Factory</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">Azure Data Factory is an ETL and orchestrator tool for building cloud-native data engineering pipelines. It has a lot of source connectors available, and this list is growing rapidly.&nbsp;To secure connection details in the Data Factory, we can store credentials in Azure key vault and access them in Azure Data Factory. This article describes how to access key vault secrets from Azure Data Factory linked services.</p>



<p class="has-large-font-size">What is Azure Key Vault?</p>



<p class="">Azure Key Vault is a cloud service used to securely save and access secrets. The secret could be anything we want to secure, like API keys, credentials, etc. It provides data encryption when it&#8217;s moving from a key vault to a client application, making it more secure. Read more about it <a href="https://azure.microsoft.com/en-us/services/key-vault/#documentation">here</a>.</p>



<p class="has-large-font-size">Let&#8217;s see it in action</p>



<p class="has-pale-cyan-blue-background-color has-background" style="font-size:18px"><strong>Pre-requisites</strong>:<br>To setup Azure key vault for storing Azure Data Factory credentials, we need: <br>1. Azure subscription and a resource group with Azure Data Factory and Azure key-vault.<br>2. Permission on key vault for setting up Access policies.</p>



<p style="font-size:24px" class="">Follow the below steps to use Azure key vault secrets in Azure Data Factory.</p>



<p class=""><strong>1. Create <a href="https://docs.microsoft.com/en-us/azure/data-factory/concepts-linked-services?tabs=data-factory" target="_blank" rel="noreferrer noopener">linked service</a> for the key vault in Azure Data Factory (ADF).</strong><br></p>



<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="938" height="421" data-attachment-id="2362" data-permalink="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/azure-key-vault-linked-service-creation/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?fit=938%2C421&amp;ssl=1" data-orig-size="938,421" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Azure-key-vault-linked-service-creation" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?fit=938%2C421&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?resize=938%2C421&#038;ssl=1" alt="azure key vault linked service" class="wp-image-2362" style="width:800px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?w=938&amp;ssl=1 938w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?resize=450%2C202&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?resize=600%2C269&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?resize=300%2C135&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Azure-key-vault-linked-service-creation.gif?resize=768%2C345&amp;ssl=1 768w" sizes="(max-width: 938px) 100vw, 938px" /></figure>



<p class="">Key vault base URL is <code>https://&lt;keyvaultName&gt;.vault.azure.net</code><br></p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="523" data-attachment-id="2363" data-permalink="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/key-vault-linked-service-setup/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?fit=1607%2C700&amp;ssl=1" data-orig-size="1607,700" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Key-Vault-Linked-Service-Setup" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?fit=1200%2C523&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=1200%2C523&#038;ssl=1" alt="azure key vault linked service" class="wp-image-2363" style="width:800px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=1200%2C523&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=450%2C196&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=600%2C261&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=300%2C131&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=768%2C335&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?resize=1536%2C669&amp;ssl=1 1536w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Key-Vault-Linked-Service-Setup.jpg?w=1607&amp;ssl=1 1607w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<p class=""><strong>2.</strong> <strong>Grant access to Azure Data Factory service principal on Azure key vault. Follow the below steps to do this.</strong></p>



<p class="">a. Navigate to key vault resource in Azure portal and click on <strong>Access policies</strong></p>



<p class="">b. Click on <strong>Add Access Policy</strong> followed by <strong>Select principal</strong> and search for Azure Data Factory resource by its name. Here, the service principal is nothing but an app (managed identity) created for the data factory in Azure active directory, </p>



<p class="">In case the managed identity for Azure Data Factory does not exist in the Azure active directory, you can create it by running below Azure CLI.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; title: ; notranslate">
#Generate managed identity for Data Factory.
Set-AzDataFactoryV2 -ResourceGroupName $resourceGroupName -Name $factoryName -Location $location
</pre></div>


<p class="">S<span style="color: initial;">elect at least get and set permission for </span><strong><span style="color: initial;">Key </span>p<span style="color: initial;">ermissions</span></strong><span style="color: initial;"> and <strong>Secret permissions,</strong></span> as shown in the image below.</p>



<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1087" height="446" data-attachment-id="2398" data-permalink="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/access-policy-setupv3/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?fit=1087%2C446&amp;ssl=1" data-orig-size="1087,446" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Access Policy Setupv3" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?fit=1087%2C446&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?resize=1087%2C446&#038;ssl=1" alt="grant access to azure data factory on key vault" class="wp-image-2398" style="width:800px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?w=1087&amp;ssl=1 1087w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?resize=450%2C185&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?resize=600%2C246&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?resize=300%2C123&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Access-Policy-Setupv3.gif?resize=768%2C315&amp;ssl=1 768w" sizes="(max-width: 1087px) 100vw, 1087px" /></figure>



<figure class="is-style-default wp-block-image size-large is-resized"><a href="https://marketplace.visualstudio.com/items?itemName=AzureOps.ssiscatalogerpro&amp;ssr=false#overview" target="_blank" rel="noopener"><img data-recalc-dims="1" decoding="async" width="1200" height="148" data-attachment-id="4839" data-permalink="https://azureops.org/articles/azure-data-studio-for-sql-developers/scmw-horizontal-ad/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1326%2C163&amp;ssl=1" data-orig-size="1326,163" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SCMW-horizontal-ad" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?fit=1200%2C148&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&#038;ssl=1" alt="" class="wp-image-4839" style="object-fit:cover;width:811px;height:99px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=1200%2C148&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=450%2C55&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=600%2C74&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=300%2C37&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?resize=768%2C94&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2023/01/SCMW-horizontal-ad.png?w=1326&amp;ssl=1 1326w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></figure>



<p class=""><strong>3. After permission configuration, the connection with the key vault should be successful</strong>.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="421" data-attachment-id="2366" data-permalink="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/successful-connection/" data-orig-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?fit=1629%2C572&amp;ssl=1" data-orig-size="1629,572" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Successful-connection" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?fit=1200%2C421&amp;ssl=1" src="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=1200%2C421&#038;ssl=1" alt="Use Key Vault Secrets in Azure Data Factory" class="wp-image-2366" style="width:800px" srcset="https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=1200%2C421&amp;ssl=1 1200w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=450%2C158&amp;ssl=1 450w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=600%2C211&amp;ssl=1 600w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=300%2C105&amp;ssl=1 300w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=768%2C270&amp;ssl=1 768w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?resize=1536%2C539&amp;ssl=1 1536w, https://i0.wp.com/azureops.org/wp-content/uploads/2022/05/Successful-connection.jpg?w=1629&amp;ssl=1 1629w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>



<p class="has-background" style="background-color:#bcefca"><strong>Pro tips:</strong><br>1. Data Factory cannot store credentials in a Git repository; hence, it is advisable to use Azure key vault to store credentials. This will avoid the immediate publishing of linked services during the development.<br>2. Follow <a href="https://azureops.org/articles/update-secret-in-azure-key-vault-using-powershell/" target="_blank" rel="noreferrer noopener">this</a> article, if you want to learn how to update key vault secrets using PowerShell.<br>3. <a href="https://azureops.org/articles/access-key-vault-from-azure-devops-pipeline/" target="_blank" rel="noreferrer noopener">Learn </a>how to access Key Vault secrets in Azure DevOps deployment pipelines.</p>



<p class="has-large-font-size">See more</p>



<iframe width="700" height="394" src="https://www.youtube.com/embed/t2h6xNVFQkc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="is-style-fill wp-block-button"><a class="wp-block-button__link has-white-color has-blush-light-purple-gradient-background has-text-color has-background has-link-color wp-element-button" href="https://azureops.org/product/ssis-catalog-migration-wizard-pro/" target="_blank" rel="noreferrer noopener">Download Now</a></div>
</div>
<p>The post <a href="https://azureops.org/articles/key-vault-secrets-in-azure-data-factory/">Use Key Vault Secrets in Azure Data Factory</a> appeared first on <a href="https://azureops.org">AzureOps</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2239</post-id>	</item>
	</channel>
</rss>
