Draft
Add Windows broker (WAM) activation prompt on browser-based login success#33700
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Copilot
AI
changed the title
[WIP] Add WAM activation prompt on browser login success
Add Windows broker (WAM) activation prompt on browser-based login success
Jul 6, 2026
Collaborator
|
WAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
az loginDescription
Windows users who authenticate via browser-based login (broker disabled via
core.enable_broker_on_windows=false) get no nudge toward the more secure WAM experience. This adds a recommendation block on the browser "login succeeded" page linking to the WAM enablement doc, shown only when the broker is disabled on a WAM-capable Windows platform.landing_pages/success.html: added a{{wam_prompt}}placeholder and.wam-promptstyling.auth/util.py:read_response_templates(show_wam_prompt=False)injects the WAM recommendation HTML (withWAM_ENABLEMENT_URL) at the placeholder when requested, else strips it. Default keeps existing callers unchanged.auth/identity.py:login_with_auth_codegates the prompt withsys.platform == 'win32' and not self._enable_broker_on_windows, so non-Windows and broker-enabled (native WAM UI, no HTML page) paths are unaffected.test_util.pycoverage for both template variants.Testing Guide
On Windows with
az config set core.enable_broker_on_windows=false, runaz loginand confirm the success page shows the WAM recommendation and doc link. With the broker enabled, or on non-Windows, the page is unchanged.Unit tests:
History Notes
[Core]
az login: Recommend enabling Web Account Manager (WAM) on the browser login success page when the broker is disabled on WindowsThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.