Skip to content

Commit 1dd71a5

Browse files
committed
interagte md
1 parent 34cb3be commit 1dd71a5

File tree

2 files changed

+199
-0
lines changed

2 files changed

+199
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Integrate Azure AI Services with Service Connector
3+
description: In this document, learn how to integrate Azure AI Services into your application with Service Connector
4+
author: wchigit
5+
ms.author: wchi
6+
ms.service: service-connector
7+
ms.topic: how-to
8+
ms.date: 06/14/2024
9+
---
10+
11+
# Integrate Azure AI Services with Service Connector
12+
13+
This page shows supported authentication methods and clients, and shows sample code you can use to connect Azure AI Services to other cloud services using Service Connector. You might still be able to connect to Azure AI Services using other methods. This page also shows default environment variable names and values you get when you create the service connection.
14+
15+
## Supported compute services
16+
17+
Service Connector can be used to connect the following compute services to Azure AI Services:
18+
19+
- Azure App Service
20+
- Azure Functions
21+
- Azure Container Apps
22+
- Azure Spring Apps
23+
24+
## Supported authentication types and client types
25+
26+
The table below shows which combinations of authentication methods and clients are supported for connecting your compute service to Azure AI Services using Service Connector. A “Yes” indicates that the combination is supported, while a “No” indicates that it is not supported.
27+
28+
29+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret/connection string | Service principal |
30+
|-------------|:--------------------------------:|:------------------------------:|:------------------------:|:-----------------:|
31+
| .NET | Yes | Yes | Yes | Yes |
32+
| Java | Yes | Yes | Yes | Yes |
33+
| Node.js | Yes | Yes | Yes | Yes |
34+
| Python | Yes | Yes | Yes | Yes |
35+
| None | Yes | Yes | Yes | Yes |
36+
37+
This table indicates that all combinations of client types and authentication methods in the table are supported. All client types can use any of the authentication methods to connect to Azure AI Services using Service Connector.
38+
39+
## Default environment variable names or application properties and sample code
40+
41+
Use the connection details below to connect compute services to Azure AI Services. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
42+
43+
### System-assigned managed identity
44+
45+
| Default environment variable name | Description | Sample value |
46+
| --------------------------------- | ---------------------------- | ------------------------------------------------ |
47+
| AZURE_AISERVICES_OPENAI_BASE | Azure OpenAI endpoint | `https://<your-Azure-AI-Services-endpoint>.openai.azure.com/` |
48+
| AZURE_AISERVICES_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<your-Azure-AI-Services-endpoint>.cognitiveservices.azure.com/` |
49+
| AZURE_AISERVICES_SPEECH_ENDPOINT | Speech to Text (Standard) API endpoint | `https://<location>.stt.speech.microsoft.com` |
50+
51+
#### Sample code
52+
Refer to the steps and code below to connect to Azure AI Services using a system-assigned managed identity.
53+
[!INCLUDE [code sample for app config](./includes/code-aiservices-me-id.md)]
54+
55+
### User-assigned managed identity
56+
57+
| Default environment variable name | Description | Sample value |
58+
| --------------------------------- | -------------------------- | ----------------------------------------------- |
59+
| AZURE_AISERVICES_OPENAI_BASE | Azure OpenAI endpoint | `https://<your-Azure-AI-Services-endpoint>.openai.azure.com/` |
60+
| AZURE_AISERVICES_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<your-Azure-AI-Services-endpoint>.cognitiveservices.azure.com/` |
61+
| AZURE_AISERVICES_SPEECH_ENDPOINT | Speech to Text (Standard) API endpoint | `https://<location>.stt.speech.microsoft.com` |
62+
| AZURE_AISERVICES_CLIENTID | Your client ID | `<client-ID>` |
63+
64+
#### Sample code
65+
Refer to the steps and code below to connect to Azure AI Services using a user-assigned managed identity.
66+
[!INCLUDE [code sample for azure AI Services](./includes/code-aiservices-me-id.md)]
67+
68+
### Connection string
69+
70+
> [!div class="mx-tdBreakAll"]
71+
> | Default environment variable name | Description | Sample value |
72+
> | --------------------------------- | ------------| ------------ |
73+
> | AZURE_AISERVICES_OPENAI_BASE | Azure OpenAI endpoint | `https://<your-Azure-AI-Services-endpoint>.openai.azure.com/` |
74+
> | AZURE_AISERVICES_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<your-Azure-AI-Services-endpoint>.cognitiveservices.azure.com/` |
75+
> | AZURE_AISERVICES_SPEECH_ENDPOINT | Speech to Text (Standard) API endpoint | `https://<location>.stt.speech.microsoft.com` |
76+
> | AZURE_AISERVICES_KEY | Azure AI Services API key | `<api-key>` |
77+
78+
#### Sample Code
79+
Refer to the steps and code below to connect to Azure AI Services using a connection string.
80+
[!INCLUDE [code sample for azure AI Services](./includes/code--aiservices--secret.md)]
81+
82+
83+
### Service principal
84+
85+
| Default environment variable name | Description | Sample value |
86+
| ----------------------------------- | -------------------------- | ---------------------------------------------- |
87+
| AZURE_AISERVICES_OPENAI_BASE | Azure OpenAI endpoint | `https://<your-Azure-AI-Services-endpoint>.openai.azure.com/` |
88+
| AZURE_AISERVICES_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<your-Azure-AI-Services-endpoint>.cognitiveservices.azure.com/` |
89+
| AZURE_AISERVICES_SPEECH_ENDPOINT | Speech to Text (Standard) API endpoint | `https://<location>.stt.speech.microsoft.com` |
90+
| AZURE_AISERVICES_CLIENTID | Your client ID | `<client-ID>` |
91+
| AZURE_AISERVICES_CLIENTSECRET | Your client secret | `<client-secret>` |
92+
| AZURE_AISERVICES_TENANTID | Your tenant ID | `<tenant-ID>` |
93+
94+
#### Sample code
95+
Refer to the steps and code below to connect to Azure AI Services using a service principaL.
96+
[!INCLUDE [code sample for azure AI Services](./includes/code-aiservices-me-id.md)]
97+
98+
## Next steps
99+
100+
Follow the tutorial listed below to learn more about Service Connector.
101+
102+
> [!div class="nextstepaction"]
103+
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Integrate Azure AI services multi-service account with Service Connector
3+
description: In this document, learn how to integrate Azure AI services multi-service account into your application with Service Connector
4+
author: wchigit
5+
ms.author: wchi
6+
ms.service: service-connector
7+
ms.topic: how-to
8+
ms.date: 06/14/2024
9+
---
10+
11+
# Integrate Azure AI services multi-service account with Service Connector
12+
13+
This page shows supported authentication methods and clients, and shows sample code you can use to connect Azure AI services multi-service account to other cloud services using Service Connector. You might still be able to connect to Azure AI services multi-service account using other methods. This page also shows default environment variable names and values you get when you create the service connection.
14+
15+
## Supported compute services
16+
17+
Service Connector can be used to connect the following compute services to Azure AI services multi-service account:
18+
19+
- Azure App Service
20+
- Azure Functions
21+
- Azure Container Apps
22+
- Azure Spring Apps
23+
24+
## Supported authentication types and client types
25+
26+
The table below shows which combinations of authentication methods and clients are supported for connecting your compute service to Azure AI services multi-service account using Service Connector. A “Yes” indicates that the combination is supported, while a “No” indicates that it is not supported.
27+
28+
29+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret/connection string | Service principal |
30+
|-------------|:--------------------------------:|:------------------------------:|:------------------------:|:-----------------:|
31+
| .NET | Yes | Yes | Yes | Yes |
32+
| Java | Yes | Yes | Yes | Yes |
33+
| Node.js | Yes | Yes | Yes | Yes |
34+
| Python | Yes | Yes | Yes | Yes |
35+
| None | Yes | Yes | Yes | Yes |
36+
37+
This table indicates that all combinations of client types and authentication methods in the table are supported. All client types can use any of the authentication methods to connect to Azure AI services multi-service account using Service Connector.
38+
39+
## Default environment variable names or application properties and sample code
40+
41+
Use the connection details below to connect compute services to Azure AI services multi-service account. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
42+
43+
### System-assigned managed identity
44+
45+
| Default environment variable name | Description | Sample value |
46+
| --------------------------------- | ---------------------------- | ------------------------------------------------ |
47+
| AZURE_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<cognitive-service-name>.cognitiveservices.azure.com/` |
48+
49+
#### Sample code
50+
Refer to the steps and code below to connect to Azure AI services multi-service account using a system-assigned managed identity.
51+
[!INCLUDE [code sample for app config](./includes/code-cognitive-me-id.md)]
52+
53+
### User-assigned managed identity
54+
55+
| Default environment variable name | Description | Sample value |
56+
| --------------------------------- | -------------------------- | ----------------------------------------------- |
57+
| AZURE_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<cognitive-service-name>.cognitiveservices.azure.com/` |
58+
| AZURE_AISERVICES_CLIENTID | Your client ID | `<client-ID>` |
59+
60+
#### Sample code
61+
Refer to the steps and code below to connect to Azure AI services multi-service account using a user-assigned managed identity.
62+
[!INCLUDE [code sample for Azure AI services multi-service account](./includes/code-cognitive-me-id.md)]
63+
64+
### Connection string
65+
66+
> [!div class="mx-tdBreakAll"]
67+
> | Default environment variable name | Description | Sample value |
68+
> | --------------------------------- | ------------| ------------ |
69+
> | AZURE_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<cognitive-service-name>.cognitiveservices.azure.com/` |
70+
> | AZURE_AISERVICES_KEY | Azure AI services multi-service account API key | `<api-key>` |
71+
72+
#### Sample Code
73+
Refer to the steps and code below to connect to Azure AI services multi-service account using a connection string.
74+
[!INCLUDE [code sample for Azure AI services multi-service account](./includes/code-cognitive-secret.md)]
75+
76+
77+
### Service principal
78+
79+
| Default environment variable name | Description | Sample value |
80+
| ----------------------------------- | -------------------------- | ---------------------------------------------- |
81+
| AZURE_AISERVICES_OPENAI_BASE | Azure OpenAI endpoint | `https://<cognitive-service-name>.openai.azure.com/` |
82+
| AZURE_AISERVICES_COGNITIVESERVICES_ENDPOINT | Azure Cognitive Services token provider service | `https://<cognitive-service-name>.cognitiveservices.azure.com/` |
83+
| AZURE_AISERVICES_CLIENTID | Your client ID | `<client-ID>` |
84+
| AZURE_AISERVICES_CLIENTSECRET | Your client secret | `<client-secret>` |
85+
| AZURE_AISERVICES_TENANTID | Your tenant ID | `<tenant-ID>` |
86+
87+
#### Sample code
88+
Refer to the steps and code below to connect to Azure AI services multi-service account using a service principaL.
89+
[!INCLUDE [code sample for Azure AI services multi-service account](./includes/code-cognitive-me-id.md)]
90+
91+
## Next steps
92+
93+
Follow the tutorial listed below to learn more about Service Connector.
94+
95+
> [!div class="nextstepaction"]
96+
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)

0 commit comments

Comments
 (0)