Skip to content
3 changes: 3 additions & 0 deletions .changes/unreleased/fixed-20251103-083447.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: fixed
body: Fix `--output_format` argument for command `fab auth status`
time: 2025-11-03T08:34:47.3979808+01:00
30 changes: 14 additions & 16 deletions src/fabric_cli/commands/auth/fab_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,20 @@ def __mask_token(scope):
storage_secret = __mask_token(fab_constant.SCOPE_ONELAKE_DEFAULT)
azure_secret = __mask_token(fab_constant.SCOPE_AZURE_DEFAULT)

# Check login status
login_status = (
Comment thread
Guust-Franssens marked this conversation as resolved.
"✓ Logged in to app.fabric.microsoft.com"
if fabric_secret != "N/A"
else "✗ Not logged in to app.fabric.microsoft.com"
)

fab_ui.print_grey(
f"""{login_status}
- Account: {upn} ({oid})
- Tenant ID: {tid}
- App ID: {appid}
- Token (fabric/powerbi): {fabric_secret}
- Token (storage): {storage_secret}
- Token (azure): {azure_secret}"""
)
# Check if user is logged in
is_logged_in = fabric_secret != "N/A"

auth_data = {
"logged_in": is_logged_in,
"account": upn,
"user_id": oid,
Comment thread
ayeshurun marked this conversation as resolved.
Outdated
"tenant_id": tid,
"app_id": appid,
"token_fabric_powerbi": fabric_secret,
"token_storage": storage_secret,
"token_azure": azure_secret,
}
fab_ui.print_output_format(args, data=auth_data, show_key_value_list=True)


# Utils
Expand Down