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

[BUG] Azure.Identity should wrap MsalUiRequiredException as inner exception when throwing CredentialUnavailableException #20218

Closed
erich-wang opened this issue Apr 8, 2021 · 6 comments · Fixed by #20371
Assignees
Labels
Azure.Identity blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Milestone

Comments

@erich-wang
Copy link
Member

Describe the bug
This is prerequisite for fix the issue Azure/azure-powershell#14717

When MsalUiRequiredException exception is thrown from MSAL library, Azure.Identity Credentials swallow the exception and throw general CredentialUnavailableException exception, e.g. SharedTokenCacheCredential. However Azure PowerShell needs to give user actionable message based on the detail error info from CredentialUnavailableException, e.g. suggest user to login with specific tenant id for MFA.

Environment:

  • Name and version of the Library package used: Azure.Identity
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 8, 2021
@erich-wang erich-wang changed the title [BUG] Azure.Identity Credentials should wrap MsalUiRequiredException as inner exception when throwing CredentialUnavailableException [BUG] Azure.Identity should wrap MsalUiRequiredException as inner exception when throwing CredentialUnavailableException Apr 8, 2021
@jsquire jsquire added Azure.Identity Client This issue points to a problem in the data-plane of the library. labels Apr 8, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 8, 2021
@jiasli
Copy link
Member

jiasli commented Apr 9, 2021

Only FYI: previously I asked azure-identity from Python SDK to expose the original MSAL error (Azure/azure-sdk-for-python#16906).

It was eventually solved by exposing the original HTTP response (Azure/azure-sdk-for-python#17442).

@christothes
Copy link
Member

Hi @erich-wang - Which credential are you using where it is not being wrapped?

@christothes christothes added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Apr 9, 2021
@erich-wang
Copy link
Member Author

At least https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/identity/Azure.Identity/src/SharedTokenCacheCredential.cs#L119-L122, I did not go thru all credentials, but most of them do not expose it.

@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Apr 13, 2021
@joshfree joshfree added the blocking-release Blocks release label Apr 14, 2021
@joshfree joshfree added this to the [2021] May milestone Apr 14, 2021
@joshfree
Copy link
Member

tagging as 'blocking-release' for the May milestone

@dingmeng-xue
Copy link
Member

Hi Josh, what's the release timeline of May milestone? We are considering whether it can be ready by the mid of May and we will release Az major release after some verifications.

User hit this vague message because recently more and more companies deployed MFA policy.

@christothes
Copy link
Member

Code complete for the Azure SDK is always the first Friday of the month; and the release is early the following week. So code complete will be Friday May 7th and the release will be the week of May 10.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants