Skip to content

macOS broker sign-in dialog displays "Python" instead of "Azure CLI" as the app name #34197

Open

Description

@Alex-AZPS

Describe the bug

When signing in via broker-based authentication on macOS (az login with core.enable_broker_on_mac=true, using a compatible broker such as Microsoft Company Portal), the sign-in dialog displays "Sign in to Python" instead of "Sign in to Azure CLI". The dialog is surfacing the underlying Python interpreter process name instead of the Azure CLI application's display name, which is confusing for end users — they have no indication the prompt originated from Azure CLI.

Repro steps

  1. On macOS, enable broker-based authentication:
    az config set core.enable_broker_on_mac=true
    az account clear
    
  2. Run az login with a compatible broker (e.g., Microsoft Company Portal) installed.
  3. Observe the broker account-picker dialog title: it reads "Sign in to Python with single sign-on" instead of referencing Azure CLI.

Expected behavior

The macOS broker dialog should identify the requesting application as "Azure CLI", not "Python". Options to consider, in order of preference:

Image

Activity

  1. yonzhan commented on Oct 9, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  2. added
    Accountaz login/account
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Oct 9, 2026
  3. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    and removed
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    on Oct 9, 2026
  4. changed the title [-]WAM/broker sign-in dialog displays "Python" instead of "Azure CLI" as the app name[/-] [+]macOS broker sign-in dialog displays "Python" instead of "Azure CLI" as the app name[/+] on Oct 9, 2026
  5. x-engineering-agent commented on Oct 9, 2026

    @x-engineering-agent
    Contributor

    Bug Analysis

    The supplied macOS broker setup, az login operation, observed "Sign in to Python" dialog, and expected "Azure CLI" identity are sufficient to investigate. This is a reported UI symptom, not a reproduced result from this round. The similar-issue lookup returned no candidates.

    Affected area: shared core authentication, not the config command used to enable the reproducer. At 8905838933eb, Identity._msal_public_app_kwargs and _msal_app pass the macOS broker option to MSAL; login_with_auth_code delegates interactive authentication to that public-client instance. The exact source of the native dialog's display name still needs confirmation.

    Requirements for the fix:

    • Trace the supported MSAL/native-broker display-name contract and make a scoped Azure CLI change that identifies the requesting application correctly. Do not assume a telemetry-only app_name value changes the native dialog.
    • Preserve client IDs, redirect behavior, broker opt-in, token-cache behavior, and Windows, browser, and device-code flows. Avoid global interpreter renaming, translated-dialog string substitutions, or authentication/security workarounds. If the required capability belongs upstream, provide concrete dependency evidence rather than an unsupported patch.
    • Add focused regression coverage through the real Identity initialization and interactive-login path, with broker-enabled/disabled and non-macOS cases. Document macOS/CLI/MSAL/broker versions and native-dialog acceptance evidence when available; mocked or Linux-only results do not demonstrate the macOS dialog's branding.

    Source ownership: the inspected path is handwritten azure-cli-core authentication code, not an AAZ-generated command. Keep unrelated command-generation and packaging changes out of scope unless the verified naming mechanism requires them; any required packaging change needs its corresponding artifact coverage.

    Target branch: dev.

    PR title & description format (required)

    This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.

    Use this EXACT PR title (copy verbatim, do not reword):

    [Core] Fix #34197: `az login`: Identify Azure CLI in the macOS broker sign-in dialog
    

    Keep the backticks around the command and the Fix #34197: prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the [Core] prefix, issue link, and backticked command must stay.

    Description — follow the PR template and fill in:

    • Link the issue — start the Description with a closing keyword so the PR auto-links and closes it: Fixes #34197.
    • Related command — the az ... command this affects.
    • Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
    • Testing Guide — example command(s) showing the fix works.
    • History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g. [Core] `az <command>`: <note>.
    • Keep the template checklist and tick the items you've satisfied.

    Posted by x-engineering-agent (Fixer)

  6. added this to the Backlog milestone on Oct 9, 2026
  7. isra-fel commented on Oct 14, 2026

    @isra-fel
    Member

    This is a limitation of the broker that it doesn't allow customizing the title of the window.

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

Metadata

Metadata

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamMSALbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions