Repository navigation
Description
- Copilot Chat Extension Version: Built-in Agent Host / Copilot SDK provider. Exact runtime version was not established from the retained logs.
- VS Code Version: Insiders
1.142.0-insider, commitff00e788322523ee1e9e8ee2c9bb4b89af93a3c2, build date2026-10-12T02:35:46Z. - OS Version: macOS.
- Feature (e.g. agent/edit/ask mode): Agents Window, Copilot Connectors surfaced as MCP servers, Sign In.
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): GPT-6.1 Sol; the failure occurs during connector authentication, independently of model invocation.
- Logs: Agent Host debug export captured October 12. Sanitized evidence is included below. The full archive contains credentials/session content and is not attached publicly.
Follow-up to #340546
WorkIQ and Kusto connector Sign In still repeatedly fails in Insiders after the fix in #340547.
The installed build contains the fix: comparing its commit with the merge commit of #340547, 8254ed199b79dec46a5b056c53e1c8a2ed987558, reports the installed build is 186 commits ahead and zero behind. Installed product metadata predates the captured failures. The exported logs independently identify the Insiders profile, but do not include a definitive build fingerprint, so this verifies the installed build rather than independently identifying the running process's commit.
The earlier PR stops retrying an unchanged token after silent authentication is rejected and restores the Authentication required state. It does not establish that interactive Sign In updates the credential the managed connector actually uses. This report tracks that remaining end-to-end failure, not just the spinner presentation.
Steps to Reproduce:
- Open an Agents Window Copilot session containing the WorkIQ and Kusto Copilot connectors.
- Open Customizations and inspect their MCP server entries. Both require authentication.
- Use Sign In and retry the affected connector.
- Observe that the connector does not become usable. It returns to
authRequiredwith an insufficient-scope challenge despite client logs reporting authentication success.
Expected: Sign In obtains the required authorization for the selected account, updates the credential used on subsequent connector requests, and allows tool discovery. A rejected credential produces an actionable failure rather than an unverified success report.
Actual: Both connectors remain unable to authenticate. The GitHub connector gateway receives a credential without the required scope. Client-side token forwarding reports success, but subsequent MCP requests still fail.
Confirmed log evidence
All times in this section are October 12, 2026, Pacific daylight time, UTC-7.
The same session records the failure for both connectors at approximately 10:30:14, 10:34:11, and 10:45:55.
The affected endpoints are:
https://api.github.com/copilot-connectors/api/v1/connectors/kusto/mcphttps://api.github.com/copilot-connectors/api/v1/connectors/workiqmcp/mcp
Both return:
HTTP 403
WWW-Authenticate challenge:
error="insufficient_scope"
scope="write:plugin_gateway_connections"
x-accepted-oauth-scopes: write:plugin_gateway_connections
x-oauth-scopes: read:user, repo, user:email, workflow
body: insufficient OAuth scope
Representative ordering:
10:30:13.602 Renderer: MCP authentication succeeded for [Kusto connector]
10:30:13.627 Renderer: MCP authentication succeeded for [WorkIQ connector]
10:30:14.556 SDK: Kusto mcp.oauth_required, reason=upscope, HTTP 403
10:30:14.634 SDK: WorkIQ mcp.oauth_required, reason=upscope, HTTP 403
The client forwards authenticate requests with scopes: ["write:plugin_gateway_connections"]. All 239 matched connector authenticate RPCs across the captured client connection return {} without a JSON-RPC error. That count includes other sessions and automatic activity; it is not 239 manual sign-in attempts in the affected session.
Captured incremental connector state updates alternate between starting and authRequired, with reason: "insufficientScope". None of those updates reaches a ready state.
At 10:31:29.581, the client lists GitHub authentication sessions with:
["user:email", "write:plugin_gateway_connections"]
["write:plugin_gateway_connections"]
Those recorded session scopes do not prove that GitHub granted them to the token sent on the connector request. The gateway's x-oauth-scopes header is the evidence for the effective credential.
These failures occur at the GitHub connector gateway, before any WorkIQ or Azure Data Explorer backend authentication can explain them.
Suspected mechanism, not yet proven for the exported runtime
Source inspection suggests a credential-routing mismatch:
- Generic MCP Sign In supplies a resource-scoped OAuth token.
- Runtime-owned connectors use the selected session account's GitHub credential provider rather than the generic MCP OAuth token provider.
- A separately scoped token can therefore be handed off without replacing the credential used on the connector's HTTP requests.
Separately, the VS Code client logs MCP authentication succeeded after forwarding the token, without waiting for a successful MCP connection or tool-list request. A successful RPC is not proof that the gateway accepted the credential.
The logs prove the incorrect effective scopes and success/failure mismatch. Matching the exported runtime revision or reproducing with credential-origin diagnostics is still needed to establish the precise routing cause.
Suggested investigation and acceptance checks
- Verify whether connector Sign In updates the same account credential source used by managed connector HTTP requests.
- Preserve the selected account while acquiring
write:plugin_gateway_connections. - Confirm the gateway sees the required scope after authorization and both WorkIQ and Kusto reach ready state and expose tools.
- Avoid reporting verified sign-in success based only on token forwarding.
- Keep the rejected-token suppression from Fix MCP auth spinner after rejected token #340547; confirm automatic retries do not replay the same rejected credential.
- Add an end-to-end regression case where an ordinary GitHub session and a connector-scoped session coexist, then exercise Sign In through tool discovery.
🤖 Posted by GitHub Copilot on Harald's behalf.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
agentHost: route Copilot Connector Sign In through Connector authoriz…
agentHost: route Copilot Connector Sign In through Connector authoriz…