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
> If you register an application in the Azure portal, this step is completed for you.
221
221
222
222
3. The last step is to [assign the "Cognitive Services User" role](/powershell/module/az.Resources/New-azRoleAssignment) to the service principal (scoped to the resource). By assigning a role, you're granting service principal access to this resource. You can grant the same service principal access to multiple resources in your subscription.
223
-
>[!NOTE]
223
+
224
+
> [!NOTE]
224
225
> The ObjectId of the service principal is used, not the ObjectId for the application.
225
226
> The ACCOUNT_ID will be the Azure resource Id of the Azure AI services account you created. You can find Azure resource Id from "properties" of the resource in Azure portal.
226
227
@@ -239,32 +240,31 @@ In this sample, a password is used to authenticate the service principal. The to
239
240
```
240
241
241
242
2. Get a token:
242
-
> [!NOTE]
243
-
> If you're using Azure Cloud Shell, the `SecureClientSecret` class isn't available.
$responseToken = Invoke-RestMethod -Uri $tokenEndpoint -Method Post -Body $body
258
+
$accessToken = $responseToken.access_token
259
+
```
263
260
261
+
> [!NOTE]
262
+
> Anytime you use passwords in a script, the most secure option is to use the PowerShell Secrets Management module and integrate with a solution such as Azure KeyVault.
263
+
264
264
3. Call the Computer Vision API:
265
265
```powershell-interactive
266
266
$url = $account.Endpoint+"vision/v1.0/models"
267
-
$result = Invoke-RestMethod -Uri $url -Method Get -Headers @{"Authorization"=$token.CreateAuthorizationHeader()} -Verbose
Copy file name to clipboardExpand all lines: articles/ai-services/computer-vision/identity-api-reference.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,4 +24,6 @@ Azure AI Face is a cloud-based service that provides algorithms for face detecti
24
24
-[LargeFaceList APIs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc): Used to manage a LargeFaceList for [Find Similar](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
25
25
-[PersonGroup Person APIs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c): Used to manage PersonGroup Person Faces for [Identification](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
26
26
-[PersonGroup APIs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244): Used to manage a PersonGroup dataset for [Identification](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
27
+
-[PersonDirectory Person APIs](https://westus.dev.cognitive.microsoft.com/docs/services/face-v1-0-preview/operations/5f06637aad1c4fba7238de25)
-[Snapshot APIs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/snapshot-take): Used to manage a Snapshot for data migration across subscriptions.
Copy file name to clipboardExpand all lines: articles/ai-services/document-intelligence/includes/preview-notice.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ ms.date: 11/21/2023
17
17
> * Features, approaches, and processes may change, prior to General Availability (GA), based on user feedback.
18
18
> * The public preview version of Document Intelligence client libraries default to REST API version [**2023-10-31-preview**](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2023-10-31-preview&preserve-view=true&tabs=HTTP).
19
19
> * Public preview version [**2023-10-31-preview**](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2023-10-31-preview&preserve-view=true&tabs=HTTP) is currently only available in the following Azure regions:
0 commit comments