Azure-Samples / Azure-Samples/AI-Gateway

lab - mcp-client-authorization - oauth failing when testing with inspector and vscode

Open
#180 0 comments 1 reaction 0 assignees View on GitHub
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.

Image

Image

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

Image

I am not sure if the lack of oauth-protected-resource not being configured is the culprit of the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.