Skip to content

Commit 02c1015

Browse files
authored
Update troubleshooting.md
1 parent 4101b58 commit 02c1015

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

articles/ai-foundry/model-inference/includes/configure-entra-id/troubleshooting.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ The following table contains multiple scenarios that can help troubleshooting Mi
1313
| ---------------- | ---------- | -------- |
1414
| `401 Principal does not have access to API/Operation` | The request indicates authentication in the correct way, however, the user principal doesn't have the required permissions to use the inference endpoint. | Ensure you have: <br /> 1. Assigned the role **Cognitive Services User** to your principal to the Azure AI Services resource. <br /> 2. Wait at least 5 minutes before making the first call. |
1515
| `401 HTTP/1.1 401 PermissionDenied` | The request indicates authentication in the correct way, however, the user principal doesn't have the required permissions to use the inference endpoint. | Assigned the role **Cognitive Services User** to your principal in the Azure AI Services resource. Roles like **Administrator** or **Contributor** don't grand inference access. Wait at least 5 minutes before making the first call. |
16-
| `401 Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.` | The request is failing to perform authentication with Entra ID as expected. The root case may be related with: <br /> 1. The request is not passing the tokens as part of the `Authentication` header. <br /> 2. The request is passing a token in the `Authentication` header, but the scope is incorrect. 3. The request is using an expired token. | Ensure the following: <br /> 1. If you are using REST API calls, ensure that the token is passes under the `Authentication` header with an scope `https://cognitiveservices.azure.com/.default`. <br /> 2. If you are using `AzureOpenAI` class from an SDK, ensure that you are using an **OpenAI model** connected to the endpoint `https://<resource>.openai.azure.com`. You can't use `OpenAI` class or a non Azure OpenAI model. If your model is not from OpenAI, use the Azure AI Inference SDK. <br /> If you're using the Azure AI Inference SDK, ensure you are connected to the endpoint `https://<resource>.services.ai.azure.com/model`. You can use this endpoint with all the model providers. |
16+
| You're using REST API calls and you get `401 Unauthorized. Access token is missing, invalid, audience is incorrect, or have expired.` | The request is failing to perform authentication with Entra ID. | Ensure the `Authentication` header contains a valid token with a scope `https://cognitiveservices.azure.com/.default`. |
17+
| You're using `AzureOpenAI` class and you get `401 Unauthorized. Access token is missing, invalid, audience is incorrect, or have expired.` | The request is failing to perform authentication with Entra ID. | Ensure that you are using an **OpenAI model** connected to the endpoint `https://<resource>.openai.azure.com`. You can't use `OpenAI` class or a Models-as-a-Service model. If your model is not from OpenAI, use the Azure AI Inference SDK. |
18+
| You're using the Azure AI Inference SDK and you get `401 Unauthorized. Access token is missing, invalid, audience is incorrect, or have expired.` | The request is failing to perform authentication with Entra ID. | Ensure you're connected to the endpoint `https://<resource>.services.ai.azure.com/model` and that you indicated the right scope for Entra ID (`https://cognitiveservices.azure.com/.default`). |
1719
| `404 Not found` | The endpoint URL is incorrect based on the SDK you are using, or the model deployment doesn't exist. | Ensure you are using the right SDK connected to the right endpoint: <br /> 1. If you are using the Azure AI inference SDK, ensure the endpoint is `https://<resource>.services.ai.azure.com/model` with `model=<model-deployment-name` in the payloads, or endpoint is `https://<resource>.openai.azure.com/deployments/<model-deployment-name>` without the parameter `model` in the payload. <br /> If you are using the `AzureOpenAI` class, ensure the endpoint is `https://<resource>.openai.azure.com`. |

0 commit comments

Comments
 (0)