Skip to content

Commit ea4d3b0

Browse files
authored
Merge pull request #6400 from sdgilley/sdg-combine-connections
combine connection articles
2 parents 02b710a + 39b6e2f commit ea4d3b0

File tree

4 files changed

+58
-63
lines changed

4 files changed

+58
-63
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"redirect_url": "/azure/ai-foundry/how-to/connections-add",
66
"redirect_document_id": false
77
},
8+
{
9+
"source_path": "articles/ai-foundry/how-to/develop/connections-add-sdk.md",
10+
"redirect_url": "/azure/ai-foundry/how-to/connections-add?pivots=hub-project",
11+
"redirect_document_id": false
12+
},
813
{
914
"source_path": "articles/ai-foundry/how-to/develop/vscode.md",
1015
"redirect_url": "/azure/ai-foundry/how-to/develop/get-started-projects-vs-code",

articles/ai-foundry/how-to/connections-add.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22

3-
title: How to add a new connection in Azure AI Foundry portal
3+
title: Add a new connection to your project
44
titleSuffix: Azure AI Foundry
5-
description: Learn how to add a new connection in Azure AI Foundry portal.
5+
description: Learn how to add a new connection to your hub based or Foundry project.
66
manager: scottpolly
77
ms.service: azure-ai-foundry
88
ms.custom:
99
- ignite-2023
1010
- build-2024
1111
- ignite-2024
1212
ms.topic: how-to
13-
ms.date: 07/08/2025
13+
ms.date: 08/05/2025
1414
ms.reviewer: sgilley
1515
ms.author: sgilley
1616
author: sdgilley
1717
zone_pivot_groups: project-type
18-
# Customer Intent: As an admin or developer, I want to understand how to add new connections in Azure AI Foundry portal.
18+
# Customer Intent: As an admin or developer, I want to understand how to add new connections in my project.
1919

2020
---
2121

22-
# How to add a new connection in Azure AI Foundry portal
22+
# Add a new connection to your project
2323

2424
[!INCLUDE [feature-preview](../includes/feature-preview.md)]
2525

@@ -77,7 +77,7 @@ To learn more about Agent Knowledge tools, see [Knowledge tool overview](https:/
7777

7878
::: zone-end
7979

80-
## Create a new connection
80+
## <a name="create-a-new-connection"></a> Create a new connection in Azure AI Foundry portal
8181

8282
[!INCLUDE [tip-left-pane](../includes/tip-left-pane.md)]
8383

@@ -103,6 +103,14 @@ Follow these steps to create a new connection that's only available for the curr
103103

104104
1. After the service is connected, select __Close__.
105105

106+
::: zone pivot="hub-project"
107+
108+
## Create a new connection with Azure Machine Learning SDK
109+
110+
[!INCLUDE [hub-connections](../includes/hub-connections.md)]
111+
112+
::: zone-end
113+
106114
## Network isolation
107115

108116
::: zone pivot="hub-project"

articles/ai-foundry/how-to/develop/connections-add-sdk.md renamed to articles/ai-foundry/includes/hub-connections.md

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,33 @@
11
---
2-
title: How to add a new connection using the Azure Machine Learning SDK
3-
titleSuffix: Azure AI Foundry
4-
description: This article provides instructions on how to add connections to other resources using the Azure Machine Learning SDK.
5-
manager: scottpolly
6-
ms.service: azure-ai-foundry
7-
ms.custom:
8-
- build-2024
9-
- ignite-2024
10-
- hub-only
11-
ms.topic: how-to
12-
ms.date: 07/22/2025
13-
ms.reviewer: dantaylo
14-
ms.author: sgilley
2+
title: Include file
3+
description: Include file
154
author: sdgilley
5+
ms.reviewer: sgilley
6+
ms.author: sgilley
7+
ms.service: azure-ai-foundry
8+
ms.topic: include
9+
ms.date: 08/05/2025
10+
ms.custom: include
1611
---
1712

18-
# Add a new connection using the Azure Machine Learning SDK
19-
20-
[!INCLUDE [hub-only](../../includes/uses-hub-only.md)]
21-
22-
[!INCLUDE [feature-preview](../../includes/feature-preview.md)]
13+
### Set up your environment
2314

24-
In this article, you learn how to add a new connection to [Azure AI Foundry](https://ai.azure.com/?cid=learnDocs) using the Azure Machine Learning SDK.
15+
[!INCLUDE [SDK setup](development-environment-config.md)]
2516

26-
Connections are a way to authenticate and consume both Microsoft and other resources within your Azure AI Foundry projects. For example, connections can be used for prompt flow, training data, and deployments. [Connections can be created](../../how-to/connections-add.md) exclusively for one project or shared with all projects in the same Azure AI Foundry hub. For more information, see [How to add a new connection in Azure AI Foundry portal](../connections-add.md).
17+
### Authenticating with Microsoft Entra ID
2718

28-
## Prerequisites
29-
30-
- An Azure subscription. If you don't have an Azure subscription, create a free account before you begin. Try the [free or paid version of Azure AI Foundry](https://azure.microsoft.com/free/) today.
31-
- An Azure AI Foundry hub. For information on creating a hub, see [Create Azure AI Foundry Services with the SDK](./create-hub-project-sdk.md).
32-
- A resource to create a connection to. For example, an AI Services resource. The examples in this article use placeholders that you must replace with your own values when running the code.
33-
34-
## Set up your environment
35-
36-
[!INCLUDE [SDK setup](../../includes/development-environment-config.md)]
37-
38-
## Authenticating with Microsoft Entra ID
39-
40-
There are various authentication methods for the different connection types. When you use Microsoft Entra ID, in addition to creating the connection you might also need to grant Azure role-based access control permissions before the connection can be used. For more information, visit [Role-based access control](../../concepts/rbac-azure-ai-foundry.md#scenario-connections-using-microsoft-entra-id-authentication).
19+
There are various authentication methods for the different connection types. When you use Microsoft Entra ID, in addition to creating the connection you might also need to grant Azure role-based access control permissions before the connection can be used. For more information, visit [Role-based access control](../concepts/rbac-azure-ai-foundry.md#scenario-connections-using-microsoft-entra-id-authentication).
4120

4221
[!INCLUDE [Azure Key Vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/microsoft-entra-id-akv-expanded.md)]
4322

44-
## Azure OpenAI in Foundry Models
23+
### Model and service connections
24+
25+
## [Azure OpenAI](#tab/aoai)
4526

4627
The following example uses the [AzureOpenAIConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.azureopenaiconnection) class to create an Azure OpenAI in Azure AI Foundry Models connection.
4728

4829
> [!TIP]
49-
> To connect to Azure OpenAI and more AI services with one connection, you can use the [AI services connection](#azure-ai-services) instead.
30+
> To connect to Azure OpenAI and more AI services with one connection, you can use the AI services connection instead.
5031
5132
```python
5233
from azure.ai.ml.entities import AzureOpenAIConnection
@@ -69,9 +50,9 @@ wps_connection = AzureOpenAIConnection(
6950
ml_client.connections.create_or_update(wps_connection)
7051
```
7152

72-
## Azure AI services
53+
## [AI services](#tab/ai-services)
7354

74-
The following example uses the [AzureAIServicesConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.azureaiservicesconnection) class to create an Azure AI services connection. This example creates one connection for the AI services documented in the [Connect to Azure AI services](../../../ai-services/connect-services-ai-foundry-portal.md) article. The same connection also supports Azure OpenAI.
55+
The following example uses the [AzureAIServicesConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.azureaiservicesconnection) class to create an Azure AI services connection. This example creates one connection for the AI services documented in the [Connect to Azure AI services](../../ai-services/connect-services-ai-foundry-portal.md) article. The same connection also supports Azure OpenAI.
7556

7657
```python
7758
from azure.ai.ml.entities import AzureAIServicesConnection
@@ -94,7 +75,7 @@ wps_connection = AzureAIServicesConnection(
9475
ml_client.connections.create_or_update(wps_connection)
9576
```
9677

97-
## Azure AI Search
78+
## [Search](#tab/search)
9879

9980
The following example uses the [AzureAISearchConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.azureaisearchconnection) class to create an Azure AI Search connection:
10081

@@ -116,7 +97,7 @@ wps_connection = AzureAISearchConnection(
11697
ml_client.connections.create_or_update(wps_connection)
11798
```
11899

119-
## Azure AI Content Safety
100+
## [Content Safety](#tab/content-safety)
120101

121102
The following example creates an Azure AI Content Safety connection:
122103

@@ -137,7 +118,7 @@ wps_connection = AzureContentSafetyConnection(
137118
ml_client.connections.create_or_update(wps_connection)
138119
```
139120

140-
## Serverless model (preview)
121+
## [Serverless model (preview)](#tab/serverless)
141122

142123
The following example creates a serverless endpoint connection:
143124

@@ -157,7 +138,11 @@ wps_connection = ServerlessConnection(
157138
ml_client.connections.create_or_update(wps_connection)
158139
```
159140

160-
## Azure Blob Storage
141+
---
142+
143+
### Data and storage connections
144+
145+
## [Blob Storage](#tab/blob)
161146

162147
The following example uses the [AzureBlobStoreConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.azureblobstoreconnection) class to create an Azure Blob Storage connection. This connection is authenticated with an account key or a SAS token:
163148

@@ -180,7 +165,7 @@ wps_connection = AzureBlobStoreConnection(
180165
ml_client.connections.create_or_update(wps_connection)
181166
```
182167

183-
## Azure Data Lake Storage Gen 2
168+
## [ADL Gen 2](#tab/adl2)
184169

185170
The following example creates Azure Data Lake Storage Gen 2 connection. This connection is authenticated with a Service Principal:
186171

@@ -208,7 +193,7 @@ wps_connection = WorkspaceConnection(
208193
ml_client.connections.create_or_update(workspace_connection=wps_connection)
209194
```
210195

211-
## Microsoft OneLake
196+
## [Microsoft OneLake](#tab/onelake)
212197

213198
The following example uses the [MicrosoftOneLakeWorkspaceConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.microsoftonelakeconnection) class to create a Microsoft OneLake connection. This connection is authenticated with a Service Principal:
214199

@@ -240,7 +225,11 @@ wps_connection = MicrosoftOneLakeWorkspaceConnection(
240225
ml_client.connections.create_or_update(workspace_connection=wps_connection)
241226
```
242227

243-
## Serp
228+
---
229+
230+
### Other connections
231+
232+
## [Serp](#tab/serp)
244233

245234
The following example uses the [SerpConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.serpconnection) class:
246235

@@ -257,7 +246,7 @@ wps_connection = SerpConnection(
257246
ml_client.connections.create_or_update(wps_connection)
258247
```
259248

260-
## OpenAI
249+
## [OpenAI](#tab/openai)
261250

262251
The following example uses the [OpenAIConnection](/python/api/azure-ai-ml/azure.ai.ml.entities.openaiconnection) class to create an OpenAI (not Azure OpenAI) connection:
263252

@@ -274,7 +263,7 @@ wps_connection = OpenAIConnection(
274263
ml_client.connections.create_or_update(wps_connection)
275264
```
276265

277-
## Custom
266+
## [Custom](#tab/custom)
278267

279268
The following example uses the [ApiKeyConfiguration](/python/api/azure-ai-ml/azure.ai.ml.entities.apikeyconnection) class to create custom connection:
280269

@@ -295,8 +284,9 @@ wps_connection = WorkspaceConnection(
295284
)
296285
ml_client.connections.create_or_update(workspace_connection=wps_connection)
297286
```
287+
---
298288

299-
## List connections
289+
### List connections
300290

301291
To list all connections, use the following example:
302292

@@ -307,18 +297,12 @@ for conn in connection_list:
307297
print(conn)
308298
```
309299

310-
## Delete connections
300+
### Delete connections
311301

312302
To delete a connection, use the following example:
313303

314304
```python
315305
name = "my-connection"
316306

317307
ml_client.connections.delete(name)
318-
```
319-
320-
## Related content
321-
322-
- [Get started building a chat app using the prompt flow SDK](../../quickstarts/get-started-code.md)
323-
- [Work with the Azure AI Foundry for Visual Studio Code extension (Preview)](get-started-projects-vs-code.md)
324-
308+
```

articles/ai-foundry/toc-files/setup-management/toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ items:
4646
items:
4747
- name: Create a connection
4848
href: ../../how-to/connections-add.md
49-
- name: Create a connection using the Azure Machine Learning SDK
50-
href: ../../how-to/develop/connections-add-sdk.md
5149
displayName: code
5250
- name: Connect and manage data
5351
href: ../../how-to/data-add.md

0 commit comments

Comments
 (0)