github / github/copilot-cli

MCP OAuth broken with agentgateway + Entra ID

Aberta
#4,584 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

triage
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

Describe the bug

Earlier, https://github.com/github/copilot-cli/issues/4490 was closed but I tested with the 1.0.81 prerelease and for our case the same error persists:

Authentication failed: MCPOAuthError: Incompatible authorization server: authorization server advertised an issuer that does not match the URL its metadata was discovered from (RFC 8414 §3.3); refusing to connect

This issuer mismatch is introduced by https://github.com/agentgateway/agentgateway/pull/2408 that works around several MCP OAuth & Entra ID incompatibilities at the cost of introducing an authorization server discovery proxy.

This works fine with Copilot version 1.0.78. The error occurs with GitHub Copilot CLI 1.0.80 and GitHub Copilot CLI 1.0.81-8 preview.

Can you please implement a skipIssuerValidation configuration option to make this work again?

Affected version

GitHub Copilot CLI 1.0.81-8

Steps to reproduce the behavior

Try to authenticate to MCP server configured on agentgateway with Entra ID following the documentation.

The https://agentgateway.domain/.well-known/oauth-authorization-server/mcp resource returns the original Entra ID issuer:
"issuer": "https://login.microsoftonline.com/tenant-id/v2.0"

Expected behavior

Copilot can authenticate to MCP OAuth server with agentgateway authorization server proxy and Entra ID again.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece pelo fluxo de autenticação OAuth do Copilot CLI MCP e reproduza a falha com a configuração do agentgateway Entra ID descrita na issue. Compare as versões 1.0.78, 1.0.80 e 1.0.81-8 e, em seguida, verifique se a autenticação é bem-sucedida, preservando o comportamento de segurança do issuer do authorization-server.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
api, authentication, cli
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
52/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.