diff --git a/src/azure-cli-core/azure/cli/core/auth/identity.py b/src/azure-cli-core/azure/cli/core/auth/identity.py index 91629e89441..dc4573d1c27 100644 --- a/src/azure-cli-core/azure/cli/core/auth/identity.py +++ b/src/azure-cli-core/azure/cli/core/auth/identity.py @@ -159,7 +159,11 @@ def _prompt_launching_ui(ui=None, **_): logger.warning(WAM_PROMPT) from .util import read_response_templates - success_template, error_template = read_response_templates() + # Recommend enabling the Windows broker (WAM) on the browser login success page only when + # the broker is disabled on a WAM-capable Windows platform, i.e. the user is falling back + # to browser-based login on Windows. + show_wam_prompt = sys.platform == 'win32' and not self._enable_broker_on_windows + success_template, error_template = read_response_templates(show_wam_prompt=show_wam_prompt) # For AAD, use port 0 to let the system choose arbitrary unused ephemeral port to avoid port collision # on port 8400 from the old design. However, ADFS only allows port 8400. diff --git a/src/azure-cli-core/azure/cli/core/auth/landing_pages/success.html b/src/azure-cli-core/azure/cli/core/auth/landing_pages/success.html index a4eb5069a79..323f0a49ef6 100644 --- a/src/azure-cli-core/azure/cli/core/auth/landing_pages/success.html +++ b/src/azure-cli-core/azure/cli/core/auth/landing_pages/success.html @@ -16,10 +16,19 @@ padding: 12px 16px; margin: 8px 0px; } + + .wam-prompt { + background-color: rgb(242, 242, 242); + border-left: 4px solid rgb(0, 120, 212); + padding: 12px 16px; + margin: 16px 0px; + max-width: 640px; + }
You can close this window, or we will redirect you to the Azure CLI documentation in 1 minute.
+ {{wam_prompt}}