github / github/app

Windows Desktop app 1.1.17:  COPILOT_ENTRA_AUTH_AUD  (EMU audience) breaks MCP Entra sign-in with  ENTRA_CONFIG 2002 - CLI on the same machine works

Open
#3,743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
No language data
Stars
2.1k
Forks
157
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Environment

Item Detail
Failing GitHub Copilot desktop app 1.1.17, Windows
Bundled CLI runtime 1.0.83 (resources/copilot-sdk/cliVersion.d.ts)
Machine Windows 11, Entra-joined, GitHub EMU configured
Working @github/copilot CLI on the same machine, same variable set
Working Desktop app 1.1.17 on macOS, that build contains no OneAuth code path
Related #4660 (WAM landed in 1.0.81; fallback fix in 1.0.82, present in 1.0.83 and still failing)
The bug

Windows devices configured for GitHub Enterprise Managed Users carry a machine-scope variable:

COPILOT_ENTRA_AUTH_AUD = "some-value"
                     = "GitHub Enterprise Managed User (OIDC)"  (GitHub's tenant)

It exists for Copilot's own Entra to GitHub token exchange. Since the WAM/OneAuth MCP path landed (#4660), it also reaches MCP sign-in, pinning a cross-tenant audience while the authority is the customer's own tenant. OneAuth rejects the configuration before any network call:

Request session.mcp.oauth.login failed: Microsoft Entra sign-in for
https://<our-mcp-server>/mcp/ failed: ENTRA_CONFIG: the authenticator
rejected the configuration [code 2002, tag 7q6cl].
Set COPILOT_ENTRA_DISABLE_ONEAUTH=1 to sign in through the browser instead.
Three observations that isolate it to the OneAuth path
  1. Clearing the variable for a single process fixes it, with no client or server change:
Remove-Item Env:\COPILOT_ENTRA_AUTH_AUD
Start-Process "$env:LOCALAPPDATA\Programs\GitHub Copilot\github.exe"

Sign-in then succeeds immediately.

  1. The CLI works on the same machine with the machine-scope variable still set, consistent with the release note that machines without the broker library keep the browser flow.

  2. macOS 1.1.17 works. That build contains no OneAuth strings at all, so the variable is never consumed.

Steps to reproduce
  1. Windows machine with COPILOT_ENTRA_AUTH_AUD set machine-wide (any EMU-configured device).
  2. Add an Entra-protected MCP server whose API lives in a different tenant.
  3. Sign in from the MCP tab. Fails 100%.
  4. Same server, same machine, via the CLI. Succeeds.
Expected behavior

MCP token acquisition ignores COPILOT_ENTRA_AUTH_AUD, and an ENTRA_CONFIG rejection falls back to the browser flow rather than failing hard.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows MCP sign-in with COPILOT_ENTRA_AUTH_AUD set, then compare the desktop OneAuth path with the working CLI and browser fallback described in the issue. Check resources/copilot-sdk/cliVersion.d.ts and the changes associated with #4660; done means MCP sign-in succeeds without clearing the machine variable and ENTRA_CONFIG rejection reaches the browser flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.