Skip to content

Commit bb2b31a

Browse files
authored
{Auth} Remove broker_error detection for re-authentication message (#31743)
1 parent 89da35f commit bb2b31a

File tree

1 file changed

+1
-5
lines changed
  • src/azure-cli-core/azure/cli/core/auth

1 file changed

+1
-5
lines changed

src/azure-cli-core/azure/cli/core/auth/util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ def aad_error_handler(error, **kwargs):
4545
recommendation = PASSWORD_CERTIFICATE_WARNING
4646
else:
4747
login_command = _generate_login_command(**kwargs)
48-
recommendation = (
49-
# Cloud Shell uses IMDS-like interface for implicit login. If getting token/cert failed,
50-
# we let the user explicitly log in to AAD with MSAL.
51-
"Please explicitly log in with:\n{}" if error.get('error') == 'broker_error'
52-
else "Interactive authentication is needed. Please run:\n{}").format(login_command)
48+
recommendation = "Interactive authentication is needed. Please run:\n{}".format(login_command)
5349

5450
from azure.cli.core.azclierror import AuthenticationError
5551
raise AuthenticationError(error_description, msal_error=error, recommendation=recommendation)

0 commit comments

Comments
 (0)