[FEATURE] Multi-account session management
@HasanAboShally がすでに取り組んでいます。
2026年4月12日 から。
評価
この issue はまだ評価されていません。
説明
Problem
Consultants and developers who work across multiple Microsoft Fabric tenants and client environments face a painful workflow today: every time they need to switch context, they must run fab auth logout followed by a full fab auth login, re-authenticating interactively each time.
Real-world use case
A typical consulting scenario:
- Client A - Production tenant
tenant-aaa, user[email protected] - Client B - Dev/test tenant
tenant-bbb, user[email protected] - Internal - Corporate tenant
tenant-ccc, user[email protected]
Switching between these today requires a full logout/login cycle for each transition, which is disruptive, slow, and breaks automation scripts that assume a persistent session.
Proposed solution
Add stored user session management to the CLI so that multiple interactive authentication sessions can coexist and be switched instantly:
| Command | Description |
|---|---|
fab auth list |
List all stored user sessions with active/valid status |
fab auth switch |
Switch to another stored session (interactive or direct) |
fab auth switch -u <account> -t <tenant> |
Switch directly to a specific account (case-insensitive) |
fab auth logout -u <account> |
Log out a specific session without affecting others |
fab auth logout --all |
Clear all stored sessions |
Behavior
- Two stored sessions, no flags:
fab auth switchautomatically toggles to the other account. - Three or more sessions, no flags: an interactive prompt is shown.
- With
-u(and optionally-t): switches directly, no prompt. - Sessions are validated against the MSAL token cache and marked as valid/invalid in
fab auth list. - Environment variable authentication (
FAB_TOKEN, etc.) takes precedence and blocks session switching with a clear error message. - Interactive login now preserves the broker-backed MSAL app across the Fabric, OneLake, and Azure token warm-up so newly selected accounts are stored cleanly on Windows.
Acceptance criteria
-
fab auth listshows all stored sessions with active/valid/last_used metadata -
fab auth switchsupports direct (-u,-t) and interactive selection -
fab auth logoutsupports per-session removal (-u,-t) and bulk (--all) - Username matching is case-insensitive
- Session switching is blocked when env var auth is active
- Documentation and examples are up to date
- Tests cover happy paths and edge cases
- 主要言語
- Python
- スター
- 173
- フォーク
- 63
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 4
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/fabric-cli のほかの issue
-
ai:bug-triage:unable-to-process bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/fabric-cli#287 · コメント 2 件 ·
-
ai:feature-triage:unable-to-process enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
microsoft/fabric-cli#292 · コメント 1 件 ·
-
ai:question-triage:unable-to-process question
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
microsoft/fabric-cli#288 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
microsoft/fabric-cli#286 · コメント 3 件 ·
-
ai:feature-triage:unable-to-process enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
microsoft/fabric-cli#279 · コメント 1 件 ·
microsoft/fabric-cli の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
letsencrypt/cp-cps#353 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DOI-USGS/pywatershed#421 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-pillow/Pillow#10087 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信