Closed
Description
- Package Name: azure-ai-inference, azure-identity
- Package Version: 1.0.0b9, 1.21.0
- Operating System: Windows
- Python Version: 3.12.9
Describe the bug
The instructions inside of Azure AI Foundry for authenticating with Entra ID fail when using the Azure AI Inference SDK.
To Reproduce
Steps to reproduce the behavior:
- Crate a standard hub and project, note API key validation is disabled.
- Use the instructions to create a
ChatCompletionClient
Running the code result in the following error:
ERROR:app:Error processing chat request: (None) Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.
Code: None
Message: Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.
Note: The instructions for the openai library work fine.