Skip to content

Commit 92bbca7

Browse files
committed
documenting entra id option
1 parent 7445853 commit 92bbca7

File tree

8 files changed

+70
-22
lines changed

8 files changed

+70
-22
lines changed

articles/ai-studio/concepts/rbac-ai-studio.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following table is an example of how to set up role-based access control for
123123
| --- | --- | ---|
124124
| IT admin | Owner of the hub | The IT admin can ensure the hub is set up to their enterprise standards. They can assign managers the Contributor role on the resource if they want to enable managers to make new hubs. Or they can assign managers the Azure AI Developer role on the resource to not allow for new hub creation. |
125125
| Managers | Contributor or Azure AI Developer on the hub | Managers can manage the hub, audit compute resources, audit connections, and create shared connections. |
126-
| Team lead/Lead developer | Azure AI Developer on the hub | Lead developers can create projects for their team and create shared resources (ex: compute and connections) at the hub level. After project creation, project owners can invite other members. |
126+
| Team lead/Lead developer | Azure AI Developer on the hub | Lead developers can create projects for their team and create shared resources (such as compute and connections) at the hub level. After project creation, project owners can invite other members. |
127127
| Team members/developers | Contributor or Azure AI Developer on the project | Developers can build and deploy AI models within a project and create assets that enable development such as computes and connections. |
128128

129129
## Access to resources created outside of the hub
@@ -214,6 +214,31 @@ If your AI Studio hub is configured with a **user-assigned managed identity**, t
214214

215215
Within the key vault, the user or service principal must have the create, get, delete, and purge access to the key through a key vault access policy. For more information, see [Azure Key Vault security](/azure/key-vault/general/security-features#controlling-access-to-key-vault-data).
216216

217+
## Scenario: Connections using Microsoft Entra ID authentication
218+
219+
When you create a connection that uses Microsoft Entra ID authentication, you must assign roles to your developers so they can access the resource.
220+
221+
| Resource | Role | Description |
222+
|----------|------|-------------|
223+
| Azure AI Search | Contributor | List API-Keys to list indexes from Azure OpenAI Studio. |
224+
| Azure AI Search | Search Index Data Contributor | Required for indexing scenarios |
225+
| Azure AI services/OpenAI | Cognitive Services OpenAI Contributor | Call public ingestion API from Azure OpenAI Studio. |
226+
| Azure AI services/OpenAI | Cognitive Services User | List API-Keys from Azure OpenAI Studio. |
227+
| Azure AI services/OpenAI | Contributor | Allows for calls to the control plane. |
228+
229+
When using Microsoft Entra ID authenticated connections in the chat playground, the services need to authorize each other to access the required resources. The admin performing the configuration needs to have the __Owner__ role on these resources to add role assignments. The following table lists the required role assignments for each resource. The __Assignee__ column refers to the system-assigned managed identity of the listed resource. The __Resource__ column refers to the resource that the assignee needs to access. For example, Azure AI OpenAI has a system-assigned managed identity that needs to be assigned the __Search Index Data Reader__ role for the Azure AI Search resource.
230+
231+
| Role | Assignee | Resource | Description |
232+
|------|----------|----------|-------------|
233+
| Search Index Data Reader | Azure AI services/OpenAI | Azure AI Search | Inference service queries the data from the index. Only used for inference scenarios. |
234+
| Search Index Data Contributor | Azure AI services/OpenAI | Azure AI Search | Read-write access to content in indexes. Import, refresh, or query the documents collection of an index. Only used for ingestion and inference scenarios. |
235+
| Search Service Contributor | Azure AI services/OpenAI | Azure AI Search | Read-write access to object definitions (indexes, aliases, synonym maps, indexers, data sources, and skillsets). Inference service queries the index schema for auto fields mapping. Data ingestion service creates index, data sources, skill set, indexer, and queries the indexer status. |
236+
| Cognitive Services OpenAI Contributor | Azure AI Search | Azure AI services/OpenAI | Custom skill |
237+
| Cognitive Services OpenAI User | Azure OpenAI Resource for chat model | Azure OpenAI resource for embedding model | Required only if using two Azure OpenAI resources to communicate. |
238+
239+
> [!NOTE]
240+
> The Cognitive Services OpenAI User role is only required if you are using two Azure OpenAI resources: one for your chat model and one for your embedding model. If this applies, enable Trusted Services AND ensure the Connection for your embedding model Azure OpenAI resource has EntraID enabled.
241+
217242
## Scenario: Use an existing Azure OpenAI resource
218243

219244
When you create a connection to an existing Azure OpenAI resource, you must also assign roles to your users so they can access the resource. You should assign either the **Cognitive Services OpenAI User** or **Cognitive Services OpenAI Contributor** role, depending on the tasks they need to perform. For information on these roles and the tasks they enable, see [Azure OpenAI roles](/azure/ai-services/openai/how-to/role-based-access-control#azure-openai-roles).

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ Follow these steps to create a new connection that's only available for the curr
5252

5353
:::image type="content" source="../media/data-connections/connection-add-browse-azure-ai-search.png" alt-text="Screenshot of the page to select Azure AI Search from a list of other resources." lightbox="../media/data-connections/connection-add-browse-azure-ai-search.png":::
5454

55-
1. Browse for and select your Azure AI Search service from the list of available services. Select **Add connection**.
55+
1. Browse for and select your Azure AI Search service from the list of available services and then select the type of __Authentication__ to use for the resource. Select **Add connection**.
56+
57+
> [!TIP]
58+
> Different connection types support different authentication methods. Using Microsoft Entra ID may require specific Azure role-based access permissions for your developers. For more information, visit [Role-based access control](../concepts/rbac-ai-studio.md#scenario-connections-using-microsoft-entra-id-authentication).
5659
5760
:::image type="content" source="../media/data-connections/connection-add-azure-ai-search-connect.png" alt-text="Screenshot of the page to select the Azure AI Search service that you want to connect to." lightbox="../media/data-connections/connection-add-azure-ai-search-connect.png":::
5861

articles/ai-studio/how-to/develop/connections-add-sdk.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Connections are a way to authenticate and consume both Microsoft and other resou
3131

3232
[!INCLUDE [SDK setup](../../includes/development-environment-config.md)]
3333

34+
## Authenticating with Microsoft Entra ID
35+
36+
There are a variety of authentication methods for the different connection types. When using 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-ai-studio.md#scenario-connections-using-microsoft-entra-id-authentication).
37+
3438
## Azure OpenAI Service
3539

3640
The following example creates an Azure OpenAI Service connection.
@@ -44,14 +48,20 @@ from azure.ai.ml.entities import UsernamePasswordConfiguration
4448

4549
name = "XXXXXXXXX"
4650

47-
target = "https://XXXXXXXXX.cognitiveservices.azure"
48-
api_key= "my-key"
51+
target = "https://XXXXXXXXX.cognitiveservices.azure.com/"
52+
4953
resource_id= "Azure-resource-id"
5054

55+
# Microsoft Entra ID
56+
credentials = None
57+
# Uncomment the following to use API key instead
58+
# api_key= "my-key"
59+
# credentials = ApiKeyConfiguration(key=api_key)
60+
5161
wps_connection = AzureOpenAIConnection(
5262
name=name,
5363
azure_endpoint=target,
54-
credentials=ApiKeyConfiguration(key=api_key),
64+
credentials=credentials,
5565
resource_id = resource_id,
5666
is_shared=False
5767
)
@@ -70,12 +80,17 @@ name = "my-ai-services"
7080

7181
target = "https://XXXXXXXXX.cognitiveservices.azure.com/"
7282
resource_id=""
73-
api_key="XXXXXXXXX"
83+
84+
# Microsoft Entra ID
85+
credentials = None
86+
# Uncomment the following to use API key instead
87+
# api_key= "my-key"
88+
# credentials = ApiKeyConfiguration(key=api_key)
7489

7590
wps_connection = AzureAIServicesConnection(
7691
name=name,
7792
endpoint=target,
78-
credentials=ApiKeyConfiguration(key=api_key),
93+
credentials=credentials,
7994
ai_services_resource_id=resource_id,
8095
)
8196
ml_client.connections.create_or_update(wps_connection)
@@ -90,13 +105,18 @@ from azure.ai.ml.entities import AzureAISearchConnection, ApiKeyConfiguration
90105
from azure.ai.ml.entities import UsernamePasswordConfiguration
91106

92107
name = "my_aisearch_demo_connection"
93-
94108
target = "https://XXXXXXXXX.search.windows.net"
95-
api_key="XXXXXXXXX"
109+
110+
# Microsoft Entra ID
111+
credentials = None
112+
# Uncomment the following to use API key instead
113+
# api_key= "my-key"
114+
# credentials = ApiKeyConfiguration(key=api_key)
115+
96116
wps_connection = AzureAISearchConnection(
97117
name=name,
98118
endpoint=target,
99-
credentials=ApiKeyConfiguration(key=api_key),
119+
credentials=credentials,
100120
)
101121
ml_client.connections.create_or_update(wps_connection)
102122
```
@@ -132,7 +152,7 @@ from azure.ai.ml.entities import ServerlessConnection
132152

133153
name = "my_maas_apk"
134154

135-
endpoint = "https://XXXXXXXXX.eastus2.inference.ai.azure.com"
155+
endpoint = "https://XXXXXXXXX.eastus2.inference.ai.azure.com/"
136156
api_key = "XXXXXXXXX"
137157
wps_connection = ServerlessConnection(
138158
name=name,
-183 KB
Loading
-436 KB
Loading

articles/machine-learning/reference-yaml-connection-ai-search.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'CLI (v2) AI Search connection YAML schema'
33
titleSuffix: Azure Machine Learning
44
description: Reference documentation for the CLI (v2) AI Search connections YAML schema.
55
services: machine-learning
6-
ms.service: machine-learning
6+
ms.service: azure-machine-learning
77
ms.subservice: core
88
ms.custom:
99
- build-2024
@@ -32,15 +32,15 @@ ms.reviewer: ambadal
3232
| `type` | string | **Required.** The connection type. | `azure_ai_search` | `azure_ai_search` |
3333
| `is_shared` | boolean | `true` if the connection is shared across other projects in the hub; otherwise, `false`. | | `true` |
3434
| `endpoint` | string | **Required.** The URL of the endpoint. | | |
35-
| `api_key` | string | **Required.** The API key used to authenticate the connection. If not provided, a Microsoft Entra ID (credential-less authentication) connection is created. | | |
35+
| `api_key` | string | The API key used to authenticate the connection. If not provided, a Microsoft Entra ID (credential-less authentication) connection is created. | | |
3636

3737
## Remarks
3838

3939
While the `az ml connection` commands can be used to manage both Azure Machine Learning and Azure AI Studio connections, the Azure AI Search connection is specific to Azure AI Studio.
4040

4141
## Examples
4242

43-
Visit [this GitHub resource]() for examples. Several are shown here. These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
43+
These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
4444

4545
### YAML: API key
4646

@@ -54,7 +54,7 @@ endpoint: https://contoso.search.windows.net/
5454
api_key: XXXXXXXXXXXXXXX
5555
```
5656
57-
### YAML: credential-less
57+
### YAML: Microsoft Entra ID
5858
5959
```yml
6060
#AzureContentSafetyConnection.yml

articles/machine-learning/reference-yaml-connection-ai-services.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: 'CLI (v2) AI Services connection YAML schema'
33
titleSuffix: Azure Machine Learning
44
description: Reference documentation for the CLI (v2) Azure AI Services connections YAML schema.
55
services: machine-learning
6-
ms.service: machine-learning
6+
ms.service: azure-machine-learning
77
ms.subservice: core
88
ms.custom:
99
- build-2024
1010
ms.topic: reference
1111

1212
author: Blackmist
1313
ms.author: larryfr
14-
ms.date: 05/09/2024
14+
ms.date: 08/21/2024
1515
ms.reviewer: ambadal
1616
---
1717

@@ -32,7 +32,7 @@ ms.reviewer: ambadal
3232
| `type` | string | **Required.** The connection type. | `azure_ai_services` | `azure_ai_services` |
3333
| `is_shared` | boolean | `true` if the connection is shared across other projects in the hub; otherwise, `false`. | | `true` |
3434
| `endpoint` | string | **Required.** The URL of the endpoint. | | |
35-
| `api_key` | string | **Required.** The API key used to authenticate the connection. If not provided, a Microsoft Entra ID (credential-less authentication) connection is created. | | |
35+
| `api_key` | string | The API key used to authenticate the connection. If not provided, a Microsoft Entra ID (credential-less authentication) connection is created. | | |
3636
| `ai_services_resource_id` | string | **Required.** The fully qualified Azure resource ID of the Azure AI Services resource. | | |
3737

3838

@@ -49,7 +49,7 @@ While the `az ml connection` commands can be used to manage both Azure Machine L
4949

5050
## Examples
5151

52-
Visit [this GitHub resource]() for examples. Several are shown here. These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
52+
These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
5353

5454
### YAML: API key
5555

@@ -63,7 +63,7 @@ api_key: XXXXXXXXXXXXXXX
6363
```
6464
6565
66-
### YAML: credential-less
66+
### YAML: Microsoft Entra ID
6767
6868
```yml
6969
#AzureAIServiceConnection.yml

articles/machine-learning/reference-yaml-connection-openai.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'CLI (v2) OpenAI connection YAML schema'
33
titleSuffix: Azure Machine Learning
44
description: Reference documentation for the CLI (v2) OpenAI connections YAML schema.
55
services: machine-learning
6-
ms.service: machine-learning
6+
ms.service: azure-machine-learning
77
ms.subservice: core
88
ms.custom:
99
- build-2024
@@ -41,7 +41,7 @@ While the `az ml connection` commands can be used to manage both Azure Machine L
4141

4242
## Examples
4343

44-
Visit [this GitHub resource]() for examples. Several are shown here. These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
44+
These examples would be in the form of YAML files and used from the CLI. For example, `az ml connection create -f <file-name>.yaml`.
4545

4646
### YAML: API key
4747

0 commit comments

Comments
 (0)