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

Improve error message from SharedCredentialCacheCredential when mutltiple usernames are in the cache #8181

Closed
ellismg opened this issue Oct 24, 2019 · 0 comments · Fixed by #8689
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.

Comments

@ellismg
Copy link
Member

ellismg commented Oct 24, 2019

In #8095 we made some changes such that the SharedCredentialCacheCredential will raise an error when there are multiple identities in the cache and the user has not specified which to use. Today, this error lists all identities that we found, so the user can know what ones are available to select.

However - there a possible cases where we have multiple identities with the same username but multiple home_account_id's. The class does not presently support this case (since we don't have enough context to pick the right one) and if you try to use one of these identities, an error will be raised so we should consider listing only identities with a single home id to prevent users from setting the username to something that it turns out will not work.

ref:

# TODO: we could identify usernames associated with exactly one home account id

# TODO: we could identify usernames associated with exactly one home account id

We expect that these cases are actually quite rare in practice.

@ellismg ellismg added Client This issue points to a problem in the data-plane of the library. Azure.Identity labels Oct 24, 2019
@chlowell chlowell added this to the [2019] December milestone Nov 12, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants