Skip to content

FIX use cognitiveservices scope for all Azure AI endpoints#1453

Open
romanlutz wants to merge 1 commit intoAzure:mainfrom
romanlutz:fix/azure-scope-cognitiveservices
Open

FIX use cognitiveservices scope for all Azure AI endpoints#1453
romanlutz wants to merge 1 commit intoAzure:mainfrom
romanlutz:fix/azure-scope-cognitiveservices

Conversation

@romanlutz
Copy link
Contributor

Remove incorrect special-case mapping of *.ai.azure.com endpoints to https://ml.azure.com/.default scope. The ml.azure.com scope is for Azure ML management APIs, not inference. The cognitiveservices scope is accepted by all Azure AI endpoints (Azure OpenAI, AI Foundry, serverless MaaS).

Also add Mistral Large Foundry endpoint to Entra auth integration tests.

Remove incorrect special-case mapping of *.ai.azure.com endpoints to
https://ml.azure.com/.default scope. The ml.azure.com scope is for Azure
ML management APIs, not inference. The cognitiveservices scope is accepted
by all Azure AI endpoints (Azure OpenAI, AI Foundry, serverless MaaS).

Also add Mistral Large Foundry endpoint to Entra auth integration tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
"""
Determine the appropriate Azure token scope based on the endpoint URL.

The Cognitive Services scope is accepted by all Azure AI endpoints including
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is included in our entra_auth_targets integration test, but annoying because it's a hard one to debug, and it used to only accept ml.azure.com....

@rlundeen2 rlundeen2 self-assigned this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants