You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Create and authenticate to the Azure OpenAI service
74
74
75
-
To use the .NET AI templates, you'll need to create and authenticate to an Azure OpenAI service:
75
+
To use the .NET AI templates with Azure OpenAI, you'll need to create and authenticate to an Azure OpenAI service.
76
+
77
+
### Create the Azure OpenAI service
76
78
77
79
1. [Create an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) if you don't already have one available.
78
80
79
-
2. Deploy the `gpt-4o-mini` and `text-embedding-3-small` models to your Azure OpenAI Service resource. When creating those deployments, give them the same names as the models (`gpt-4o-mini` and `text-embedding-3-small`). To learn how to deploy a model, see [Create a resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) in the Azure OpenAI docs.
81
+
1. Deploy the `gpt-4o-mini` and `text-embedding-3-small` models to your Azure OpenAI Service resource. When creating those deployments, give them the same names as the models (`gpt-4o-mini` and `text-embedding-3-small`) so that they match the default template values. To learn how to deploy a model, see [Create a resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) in the Azure OpenAI docs.
82
+
83
+
### Authenticate to the Azure OpenAI service
84
+
85
+
The AI template uses Microsoft Entra ID for seamless, keyless authentication. It leverages [`DefaultAzureCredential`](/dotnet/api/azure.identity.defaultazurecredential) to automatically detect and utilize credentials from your development tools when running locally. To connect to the service, ensure your developer account has the appropriate roles assigned and is signed in to your local development tools.
86
+
87
+
1. Assign a role to your developer account to access the Azure OpenAI resource:
80
88
81
-
3. The AI template is configured to use Microsoft Entra ID for keyless authentication. Configure the Azure OpenAI resource for keyless authentication:
89
+
- In the Azure Portal, navigate to the overview page of your Azure OpenAI resource.
90
+
- Select **Access control (IAM)** from the left navigation.
91
+
- [Add a role assignment](/dotnet/azure/sdk/authentication/local-development-dev-accounts#assign-roles-to-the-group) for the `Azure AI Developer` role to your Azure account.
82
92
83
-
- In the Azure Portal, navigate to the overview page of your Azure OpenAI resource.
84
-
- Select **Access control (IAM)** from the left navigation.
85
-
- [Add a role assignment](/azure/developer/ai/keyless-connections) for the `Azure AI Developer` role to your Azure account.
93
+
1. [Sign-in to a local development tool](/dotnet/azure/sdk/authentication/local-development-dev-accounts#sign-in-to-azure-using-developer-tooling) such as Visual Studio or the Azure CLI using the Azure account you assigned the `Azure AI Developer` role to.
0 commit comments