Skip to content

Commit

Permalink
preferred_username should be... preferred
Browse files Browse the repository at this point in the history
Apparently it's possible for preferred_username to be like `[email protected]` while `email` is set to `[email protected]`... This is the more correct ordering.
  • Loading branch information
TylerLeonhardt committed Nov 28, 2023
1 parent 8ff37a6 commit cf1b0ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/microsoft-authentication/src/AADHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export class AzureActiveDirectoryService {
scope: scopeData.scopeStr,
sessionId,
account: {
label: claims.email ?? claims.preferred_username ?? claims.unique_name ?? '[email protected]',
label: claims.preferred_username ?? claims.email ?? claims.unique_name ?? '[email protected]',
id,
type: claims.tid === MSA_TID || claims.tid === MSA_PASSTHRU_TID ? MicrosoftAccountType.MSA : MicrosoftAccountType.AAD
}
Expand Down

0 comments on commit cf1b0ce

Please sign in to comment.