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

Use email for label & use label to group results in Account menu #193727

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

TylerLeonhardt
Copy link
Member

So, when you make a new session in the Microsoft Identity stack, depending on the scopes you pass in you might get:

  • A token with a name & email
  • A token with just a name
    Additionally, Microsoft has like 3-4 concepts of essentially an "id" but depending on what you're trying to access, you might get a different value.

This historical behavior leads to 2 awkward things:

  1. The account menu shows two accounts, one with name & email, one with just email.
  2. The account menu shows two of the same accounts, but their underlying id is different

So, to fix this, we're just gonna lean on the labels. In other words, if there are two accounts that share the same label, then they will be grouped together.

The previous behavior was hurting the Azure Account folks and the Q# folks and with this change, I believe they both should be happy.

Interestingly enough, when I inherited this code, it use to do this, but I changed it to use the id as that seemed "more correct"... so it a way, this is reverting a change I did a while back.

Fixes #184218

So, when you make a new session in the Microsoft Identity stack, depending on the scopes you pass in you might get:
* A token with a name & email
* A token with just a name
Additionally, Microsoft has like 3-4 concepts of essentially an "id" but depending on what you're trying to access, you might get a different value.

This historical behavior leads to 2 awkward things:
1. The account menu shows two accounts, one with name & email, one with just email.
2. The account menu shows two of the same accounts, but their underlying id is different

So, to fix this, we're just gonna lean on the labels. In other words, if there are two accounts that share the same label, then they will be grouped together.

The previous behavior was hurting the Azure Account folks and the Q# folks and with this change, I believe they both should be happy.

Interestingly enough, when I inherited this code, it use to do this, but I changed it to use the id as that seemed "more correct"... so it a way, this is reverting a change I did a while back.

Fixes #184218
@TylerLeonhardt TylerLeonhardt self-assigned this Sep 21, 2023
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) September 21, 2023 19:34
@VSCodeTriageBot VSCodeTriageBot added this to the September 2023 milestone Sep 21, 2023
@TylerLeonhardt TylerLeonhardt merged commit d5c2817 into main Sep 21, 2023
7 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/calm-swordtail branch September 21, 2023 21:09
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate accounts appearing after requesting multiple sessions
3 participants