Skip to content

Commit 3870467

Browse files
committed
PR review fixes
1 parent cc2ef16 commit 3870467

File tree

3 files changed

+141
-1
lines changed

3 files changed

+141
-1
lines changed
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Set Up Azure Key Vault Connection in AI Foundry
3+
description: Learn how to securely connect your Azure Key Vault to AI Foundry. Follow step-by-step instructions to manage secrets and ensure seamless integration.
4+
author: jonburchel
5+
ms.author: jburchel
6+
ms.reviewer: andyaviles
7+
ms.date: 08/27/2025
8+
ms.topic: how-to
9+
ms.service: azure-ai-foundry
10+
ai.usage: ai-assisted
11+
zone_pivot_groups: setup-key-vault
12+
---
13+
# Set up a Key Vault connection in Azure AI Foundry
14+
15+
Azure Key Vault is a service for securely storing and accessing secrets.
16+
If you don't create a Key Vault connection, Azure AI Foundry stores connection details in a Microsoft-managed Azure Key Vault. The managed Key Vault doesn't appear in your Azure subscription. If you prefer to manage
17+
secrets, connect your own Azure Key Vault.
18+
19+
> [!NOTE]
20+
> Review limitations before you set up your Key Vault connection.
21+
22+
## Limitations
23+
24+
Create Azure Key Vault connections only when needed.
25+
26+
If you bring your own Azure Key Vault, review these limitations:
27+
28+
- One Azure Key Vault connection per AI Foundry resource is allowed. Delete an Azure Key Vault connection only if no other connections exist at the AI Foundry resource or project level. AI Foundry doesn't support secret migration, so remove and recreate connections yourself.
29+
- Deleting the underlying Azure Key Vault breaks the AI Foundry resource. Key Vault stores secrets for connections that don't use Entra ID, so any AI Foundry feature that depends on those connections stops working.
30+
- Deleting the AI Foundry resource's connection secrets stored in your bring-your-own (BYO) Azure Key Vault can break connections to other services. It may break connections to other services.
31+
32+
::: zone pivot="ai-foundry-portal"
33+
34+
## Create an Azure Key Vault connection
35+
36+
Follow these steps to create a new connection to Azure Key Vault.
37+
38+
1. Go to your project in the Azure AI Foundry portal. If you don't have a project, create a new project.
39+
40+
1. Make sure no connections exist in the **Resource** or **Project** sections. If any exist, **Azure Key Vault** isn't available as an option.
41+
42+
1. In the **Resource** section, select **Connected resources**.
43+
44+
1. In the **Connected resources** section, select **+ New connection**.
45+
46+
:::image type="content" source="../media/setup-key-vault-connection/select-azure-key-vault.jpeg" alt-text="Screenshot of the Connected resources section with the + New connection button selected, showing Azure Key Vault as an available option.":::
47+
48+
1. Select **Azure Key Vault**.
49+
50+
:::image type="content" source="../media/setup-key-vault-connection/azure-key-vault-connection.jpeg" alt-text="Screenshot of the Azure Key Vault selection dialog with Azure Key Vault selected.":::
51+
52+
1. Select your **Azure Key Vault**, and then select **Connect**.
53+
54+
::: zone-end
55+
::: zone pivot="bicep"
56+
57+
## Create a Key Vault connection
58+
59+
<!-- Pull this content from the [foundry-samples repository (keyvaultconnection branch)](https://github.com/andyaviles121/foundry-samples/tree/keyvaultconnection) after it's merged.
60+
61+
TBD - DO NOT PUBLISH WITHOUT UPDATING THIS WITH THE REAL CODE FOR THE SAMPLE.
62+
-->
63+
64+
65+
::: zone-end
66+
67+
## Key Vault connection management
68+
69+
### Creation
70+
71+
Create a Key Vault connection only when it's the only connection.
72+
Make sure no other connections exist at the Foundry resource or project level.
73+
The service blocks Key Vault connection creation if other connections are present.
74+
If the UI doesn't show a Key Vault connection category when you choose a connection,
75+
this can be the reason. Delete other connections, and then try again.
76+
77+
When you create a Key Vault connection, the managed Key Vault in Azure isn't used.
78+
79+
### Deletion
80+
81+
Before you delete an Azure Key Vault connection from AI Foundry, remove all other connections.
82+
After you remove all other connections at the Foundry resource and project levels,
83+
delete the Key Vault connection. Foundry doesn't support secret migration.
84+
85+
### Update or change
86+
87+
To switch from Azure Key Vault 1 to Azure Key Vault 2, delete the Azure Key Vault 1 connection, and then create the Azure Key Vault 2 connection. Follow the deletion and creation steps, and migrate any connection secrets.
88+
89+
### Key Vault secret lifecycle
90+
91+
When you delete connections from your managed Key Vault, the corresponding secrets are deleted.
92+
Deleting a Key Vault connection also deletes its secrets.
93+
94+
### Granting AI Foundry access to your key vault
95+
96+
Depending on how your key vault is provisioned, you might need to apply additional permissions.
97+
Check whether your Azure Key Vault uses role-based access control (RBAC) or access policies, and then continue.
98+
99+
#### Role-based access control (RBAC)
100+
101+
After you create the Key Vault connection, assign an appropriate RBAC role in the Azure portal. Key Vault Contributor or Key Vault Administrator are two roles that work. For minimal permissions, use the [Key Vault Secrets
102+
Officer](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-officer).
103+
104+
#### Access policies
105+
106+
Similar to RBAC roles, assign the appropriate key vault access policy (if applicable) to the Foundry resource's managed identity.
107+
108+
## Infrastructure as code templates
109+
110+
As a best practice, when setting up ARM, Bicep, or Terraform templates to create resources, make sure the Azure Key Vault connection is the first connection you create, and make all other connections depend on the Key Vault connection succeeding. This order helps reduce Key Vault connection failures. If you don't follow this best practice, your templates can encounter race conditions across your connections. As a result, deployments can work sometimes and fail at other times because Foundry doesn't support secret migration.
111+
112+
After you create the Foundry resource and the Key Vault connection, assign the appropriate RBAC roles to the Foundry resource. Make all other connections depend on this role assignment succeeding. The same applies if your Key Vault uses access policies instead of RBAC.
113+
114+
### Follow this order in your infrastructure as code templates
115+
116+
1. Create the Foundry resource.
117+
1. Create a Foundry project.
118+
1. Create the Azure Key Vault connection.
119+
1. Assign the appropriate RBAC role on the Key Vault for the Foundry resource.
120+
1. (Optional) Validate that the RBAC role has taken effect.
121+
1. Create any other connections at the resource or project level, and set the `dependsOn` field for steps 3 and 4.
122+
123+
#### Deletion
124+
125+
For cleanup, if you automate resource deletion by using templates, follow the creation steps in reverse:
126+
127+
1. Delete all connections at the Foundry resource or project level.
128+
1. Delete the Azure Key Vault connection.
129+
1. Delete all Foundry projects.
130+
1. Delete the Foundry resource.
131+
132+
## Related content
133+
134+
- [Azure Key Vault documentation](/azure/key-vault/)
135+
- [AI Foundry documentation](/azure/ai-foundry/)

articles/ai-foundry/includes/first-run-experience.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.custom: include
1111
---
1212
## First run experience
1313

14-
Use this fast path when you don't have any projects yet. Pick what you want to do and we create the project and get you into the right playground. It is suggested to start with
14+
Use this fast path when you don't have any projects yet. Pick what you want to do and we create the project and get you into the right playground. It is suggested to start with an agent but you can also explore models through the Foundry portal or model catalog.
1515

1616
# [Agent (_recommended_)](#tab/azure-ai-foundry)
1717

articles/ai-foundry/toc-files/other-resources/toc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ items:
55
href: ../../faq.yml
66
- name: Support & help options
77
href: ../../../ai-services/cognitive-services-support-options.md?context=/azure/ai-foundry/context/context
8+
<<<<<<< Updated upstream
9+
=======
10+
- name: Set up Azure Key Vault
11+
href: ../../how-to/set-up-key-vault-connection.md
12+
>>>>>>> Stashed changes
813
- name: Use Azure AI Foundry with a screen reader
914
href: ../../tutorials/screen-reader.md
1015
- name: Feature availability

0 commit comments

Comments
 (0)