Skip to content

Commit

Permalink
Use UserPrincipalName as a primary source as account email. Do not re…
Browse files Browse the repository at this point in the history
…ly on the email attribute
  • Loading branch information
zippunov committed Mar 15, 2024
1 parent 1a48a9a commit 9587bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/microsoftonline/microsoftonline.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func userFromReader(r io.Reader, user *goth.User) error {
}

user.UserID = u.ID
user.Email = defaults.String(u.Email, u.UserPrincipalName)
user.Email = defaults.String(u.UserPrincipalName, u.Email)
user.Name = u.Name
user.NickName = u.Name
user.FirstName = u.FirstName
Expand Down

0 comments on commit 9587bf3

Please sign in to comment.