Skip to content

Windows: Entra broker token cache stays 0 bytes after MCP sign-in, so every new process re-prompts #5236

Open

Description

@bha7esh

Describe the bug

After I sign in through the Microsoft Entra account broker for an HTTP MCP server, the token cache file stays empty. Every new process shows the account picker again. A /restart in the same process does not prompt.

~\.copilot\entra-broker-accounts\<id>.bin is written (1,974 bytes) when I pick the account. ~\.copilot\entra-broker-cache\<id>.bin stays at 0 bytes. I did not read the file contents.

Affected version

1.0.103

Steps to reproduce the behavior

  1. Add an HTTP MCP server that uses Entra sign-in to ~\.copilot\mcp-config.json: {"mcpServers": {"EngHub": {"type": "http", "url": "https://mcp.eng.ms", "tools": ["*"]}}}
  2. Start a session. The CLI shows Authenticating: EngHub and the Windows "Pick an account" dialog.
  3. Pick the signed-in account. Authentication succeeds.
  4. Check the file sizes in ~\.copilot\entra-broker-cache\ and ~\.copilot\entra-broker-accounts\. The cache file is 0 bytes.
  5. Exit and start a new session. The account picker shows again.
  6. Run /restart in a running session. No prompt shows.

Expected behavior

The token is saved in entra-broker-cache. A new process signs in silently without the account picker.

Additional context

Activity

  1. added theissue type on Oct 22, 2026
  2. added
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    and removed on Oct 23, 2026
  3. jlac0716 commented on Oct 25, 2026

    @jlac0716

    Additional observations from a Windows x64 startup on 10/25, using PowerShell, Copilot CLI 1.0.103 and Agency 2026.10.22.3:

    • Repeated Microsoft account windows occur when starting new sessions with EngHub and IcM configured as HTTP MCP servers.
    • A metadata-only check found the Entra broker token-cache file at 0 bytes and the account record at 1,974 bytes. The empty cache file's last-write date is 10/7; the account record was updated on 10/25. I have not established whether this startup attempted to rewrite the cache. No credential-file contents were inspected.
    • The same startup also logged an IcM authentication failure at 18:12:33 UTC: A Microsoft sign-in is already in progress. Complete or cancel it before trying again.

    The last observation matches the concurrent-sign-in message in #5250: broker sign-ins rejected instead of queued, but on Windows rather than macOS. It does not reproduce that report's separate rejected-cached-token scenario.

    These observations suggest checking token persistence and concurrent sign-in handling separately; they do not prove a common root cause. Scope-binding configuration on this machine is non-default, so this is not a clean-default-settings reproduction. No cache deletion, auth-setting changes or runtime patches were made for this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryarea:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions