Skip to content

Power BI Remote MCP Server: Support silent token caching to avoid login prompt on every session #1922

@ericchansen

Description

@ericchansen

The Power BI Remote MCP server (https://api.fabric.microsoft.com/v1/mcp/powerbi) triggers a browser-based Microsoft Entra login prompt every time an MCP client session starts. This is disruptive for CLI-based clients like GitHub Copilot CLI where MCP servers initialize at session start.

Current behavior

  • Starting a new Copilot CLI session triggers a browser popup for Entra auth
  • This happens even if the user was authenticated minutes ago in a previous session
  • The login prompt appears regardless of whether the user intends to use Power BI tools in that session

Expected behavior

  • First-time auth should prompt normally
  • Subsequent sessions should use cached/refreshed tokens silently (similar to Azure CLI's token cache in ~/.azure/)
  • The server should only re-prompt when the cached token is truly expired and cannot be refreshed

Impact

  • Users who want Power BI MCP available "just in case" face auth friction on every session start
  • The only workaround is removing the server from MCP config entirely, losing access to Power BI tools

Suggested approach

  • Cache Entra refresh tokens locally (e.g., in ~/.powerbi-mcp/ or ~/.azure/) with appropriate TTL
  • On session init, attempt silent token acquisition first; only prompt interactively if silent refresh fails
  • This matches the pattern used by Azure CLI, Azure Developer CLI, and other Microsoft tools that support "login once, use many"

Environment

  • MCP Client: GitHub Copilot CLI
  • OS: Windows 11
  • MCP config entry: {"type": "http", "url": "https://api.fabric.microsoft.com/v1/mcp/powerbi"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedneeds-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionFurther information is requested

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions