Skip to content

Commit 8b05e0f

Browse files
committed
Learn Editor: Update managed-identity.md
1 parent 1ca7f56 commit 8b05e0f

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

articles/ai-services/openai/how-to/managed-identity.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ In the following sections, you'll use the Azure CLI to assign roles, and obtain
2222

2323
- An Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>
2424
- Access granted to the Azure OpenAI Service in the desired Azure subscription
25+
- Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at [https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue.
26+
27+
- [Custom subdomain names are required to enable features like Azure Active Directory (Azure AD) for authentication.](
28+
/articles/ai-services/cognitive-services-custom-subdomains)
2529

26-
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <a href="https://aka.ms/oai/access" target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue.
2730
- Azure CLI - [Installation Guide](/cli/azure/install-azure-cli)
2831
- The following Python libraries: os, requests, json
2932

@@ -62,15 +65,17 @@ Assigning yourself to the "Cognitive Services User" role will allow you to use y
6265
```
6366
6467
4. Make an API call
65-
Use the access token to authorize your API call by setting the `Authorization` header value.
6668
67-
```bash
68-
curl ${endpoint%/}/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2023-05-15 \
69-
-H "Content-Type: application/json" \
70-
-H "Authorization: Bearer $accessToken" \
71-
-d '{ "prompt": "Once upon a time" }'
72-
```
69+
Use the access token to authorize your API call by setting the `Authorization` header value.
7370
71+
```yaml
72+
```bash
73+
curl ${endpoint%/}/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2023-05-15 \
74+
-H "Content-Type: application/json" \
75+
-H "Authorization: Bearer $accessToken" \
76+
-d '{ "prompt": "Once upon a time" }'
77+
```
78+
```
7479
## Authorize access to managed identities
7580
7681
OpenAI supports Azure Active Directory (Azure AD) authentication with [managed identities for Azure resources](../../../active-directory/managed-identities-azure-resources/overview.md). Managed identities for Azure resources can authorize access to Azure AI services resources using Azure AD credentials from applications running in Azure virtual machines (VMs), function apps, virtual machine scale sets, and other services. By using managed identities for Azure resources together with Azure AD authentication, you can avoid storing credentials with your applications that run in the cloud.
@@ -86,3 +91,4 @@ Before you can use managed identities for Azure resources to authorize access to
8691
- [Azure Resource Manager client libraries](../../../active-directory/managed-identities-azure-resources/qs-configure-sdk-windows-vm.md)
8792
8893
For more information about managed identities, see [Managed identities for Azure resources](../../../active-directory/managed-identities-azure-resources/overview.md).
94+

0 commit comments

Comments
 (0)