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

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions