Skip to content

Copilot Connectors: WorkIQ and Kusto Sign In still fails with insufficient_scope after #340547 #341123

Closed

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, commit ff00e788322523ee1e9e8ee2c9bb4b89af93a3c2, build date 2026-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:

  1. Open an Agents Window Copilot session containing the WorkIQ and Kusto Copilot connectors.
  2. Open Customizations and inspect their MCP server entries. Both require authentication.
  3. Use Sign In and retry the affected connector.
  4. Observe that the connector does not become usable. It returns to authRequired with 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/mcp
  • https://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.

Activity

  1. added
    bug
    agent-host
    on Oct 12, 2026
  2. added a commit that references this issue on Oct 19, 2026
    4f24082
  3. added
    unreleased
    on Oct 19, 2026
  4. added this to the 1.144.0 milestone on Oct 19, 2026
  5. added a commit that references this issue on Oct 19, 2026
    9acd0e2
  6. added
    insiders-released
    and removed
    unreleased
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostbugcopilot-connectorsinsiders-releasedverified

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions