Skip to content

Commit

Permalink
fix: Handle user type guest in azure ad
Browse files Browse the repository at this point in the history
  • Loading branch information
Pornchai committed Dec 24, 2024
1 parent 5058353 commit ed60fed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auth-strategies/azure-oidc/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export function getAzureAdminStrategy(id: string): StrategyFactory<AzureAuthOpti
if (this.strategyOptions.admin.verifyCallback) {
return await this.strategyOptions.admin.verifyCallback(this.container, req, profile, this.strict);
}

const email = profile?.upn || profile?._json.unique_name || profile?._json.email;
const authprofile: Profile = {
emails: [{ value: profile?.upn }],
emails: [{ value: email }],
name: { givenName: profile?.name?.givenName, familyName: profile?.name?.familyName },
};

Expand Down

0 comments on commit ed60fed

Please sign in to comment.