Typical errors: 401 Unauthorized, 403 Forbidden, Invalid API key.
- Verify your Azure AD token or API key matches the resource.
- Ensure the resource principal has cognitive services user role.
- Check the
EndpointURL is correct and region‑specific.
curl -X POST "https://{region}.api.cognitive.microsoft.com/face/v1.0/detect" \
-H "Ocp-Apim-Subscription-Key: <YOUR_KEY>" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/image.jpg"}'