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
Passwordless authentication is more secure than key-based alternatives and is the recommended approach for connecting to Azure services. If you choose Passwordless authentication, you'll need to complete the following:
62
+
63
+
1. Add the [`Azure.Identity`](https://www.nuget.org/packages/Azure.Identity) package.
64
+
65
+
```dotnetcli
66
+
dotnet add package Azure.Identity
67
+
```
68
+
69
+
1. Assign the `Cognitive Services User` role to your user account. This can be done in the Azure portal on your OpenAI resource under **Access control (IAM)** > **Add role assignment**.
70
+
1. Sign-in to Azure using Visual Studio or the Azure CLI via `az login`.
71
+
59
72
### Create the assistant
60
73
61
74
Update the `Program.cs` file with the following code to create an assistant:
@@ -64,7 +77,8 @@ Update the `Program.cs` file with the following code to create an assistant:
64
77
using Azure;
65
78
using Azure.AI.OpenAI.Assistants;
66
79
67
-
// Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning.
80
+
// Assistants is a beta API and subject to change
81
+
// Acknowledge its experimental status by suppressing the matching warning.
0 commit comments