Azure-Samples / azure-ai-vision-sdk

SDK for Microsoft's Azure AI Vision
MIT License
84 stars 50 forks source link

install azure-ai-vision-faceanalyzer@latest fails #117

Open eolamisan opened 1 month ago

eolamisan commented 1 month ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Steps to reproduce the behavior: Follow steps https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/GET_FACE_ARTIFACTS_ACCESS.md Get 403 Forbidden for GET and POST when making the request to with Bearer Token and subscriptionId https://face-sdk-gating-helper-2.azurewebsites.net/sdk/subscriptions/{subscriptionId}/tokens?id={tokenId}

Any log messages given by the failure

Generating a new token... Invoke-RestMethod : The remote server returned an error: (403) Forbidden. At C:\source\GitHub\azure-ai-vision-sdk\scripts\get_face_access_token.ps1:21 char:13+ $response = Invoke-RestMethod -Uri "https://face-sdk-gating-helper-2. ... + ~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand Token generated successfully.

Expected/desired behavior

The token is generated successfully.

OS and Version?

Windows 11 Enterprise. 23H2

Versions

latest

Mention any other details that might be useful

Access to restricted face API and All Face REST API works fine.

image


Thanks! We'll be in touch soon.

diljale commented 1 week ago

Hello, Can you please ensure you have met the prerequisites to use FaceLiveness feature ? https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/GET_FACE_ARTIFACTS_ACCESS.md#prerequisites

Thanks

eolamisan commented 1 week ago

Azure account with Cognitive Services Contributor role with subscription-level scope, or equivalently, the following permissions with subscription-level scope: Microsoft.Authorization/permissions/read Microsoft.CognitiveServices/accounts/listKeys/action Microsoft.CognitiveServices/accounts/regenerateKey/action

I have contributor role on the face resource. Don't have roles for the subscription.

diljale commented 1 week ago

Assuming you have already done step 1 which is "An Azure Subscription ID approved for Face Liveness Detection (complete the Face Recognition intake form)."

Then i think you just need to provide permissions needed in Step 2 for subscription-level-scope, to access the artifacts.