Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect-AzAccount should emit actionable message if non-first tenant needs MFA #14717

Closed
erich-wang opened this issue Apr 8, 2021 · 1 comment
Assignees
Labels
Accounts Issues in Az.Accounts except authentication related

Comments

@erich-wang
Copy link
Member

erich-wang commented Apr 8, 2021

Description

When user has multiple tenants and first tenant doesn't need MFA but non-first tenant needs MFA, currently Connect-AzAccount doesn't provide actionable message to end user:

WARNING: Unable to acquire token for tenant 'xxxx'

We should provide actionable message to end user like:

WARNING: Tenant 'xxx-bad9-b7b93a3e9c5a' requires Multi-Factor Authentication (MFA). Please run `Connect-AzAccount -TenantId xxx` explicitly to access this tenant.

However the proposed fix needs some change in Azure.Identity to expose underlying MSAL exception, log one issue Azure/azure-sdk-for-net#20218 to track this request.

@erich-wang erich-wang added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Apr 8, 2021
@dingmeng-xue dingmeng-xue added Accounts Issues in Az.Accounts except authentication related and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Apr 9, 2021
@dingmeng-xue dingmeng-xue added this to the S187 (2021-05-25) milestone Apr 15, 2021
@erich-wang
Copy link
Member Author

The issue is addressed in the PR #14977 which will be released on May 25, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accounts Issues in Az.Accounts except authentication related
Projects
None yet
Development

No branches or pull requests

2 participants