Skip to content

Commit

Permalink
Add preferred_username to the list of msft token claims (#106511)
Browse files Browse the repository at this point in the history
  • Loading branch information
olegoid authored Sep 11, 2020
1 parent c53524a commit 352a390
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/microsoft-authentication/src/AADHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface ITokenClaims {
tid: string;
email?: string;
unique_name?: string;
preferred_username?: string;
oid?: string;
altsecid?: string;
ipd?: string;
Expand Down Expand Up @@ -454,7 +455,7 @@ export class AzureActiveDirectoryService {
scope,
sessionId: existingId || `${claims.tid}/${(claims.oid || (claims.altsecid || '' + claims.ipd || ''))}/${uuid()}`,
account: {
label: claims.email || claims.unique_name || 'user@example.com',
label: claims.email || claims.unique_name || claims.preferred_username || 'user@example.com',
id: `${claims.tid}/${(claims.oid || (claims.altsecid || '' + claims.ipd || ''))}`
}
};
Expand Down

0 comments on commit 352a390

Please sign in to comment.