Azure-Samples / Azure-Samples/AI-Gateway
lab - mcp-client-authorization - oauth failing when testing with inspector and vscode
- Dominant language
- Jupyter Notebook
- Stars
- 986
- Forks
- 513
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
The Lab to configure oauth with apim seems broken.
When performing the oauth flow, all seems to work fine.
Consent page is opened. But after redirect back after consent, I get the following error.
Error from vscode
2025-07-11 10:12:07.446 [warning] Error getting token from server metadata: Canceled: Canceled
When observing the logs of APIM, I notice inspector is trying to reach :
- GET /.well-known/oauth-protected-resource
- OPTIONS /.well-known/oauth-protected-resource
Which are not exposed by the oauth api. Only endpoints at .well-known are oauth-authorization-server
I am not sure if the lack of oauth-protected-resource not being configured is the culprit of the issue.
Contributor guide
Assessment
This issue has not been assessed yet.