diff --git a/auth/azure-ad.go b/auth/azure-ad.go index f5bdf4c5b..f6f565fba 100644 --- a/auth/azure-ad.go +++ b/auth/azure-ad.go @@ -66,7 +66,7 @@ func handleAzureCallback(w http.ResponseWriter, r *http.Request) { return } } - user, err := logic.GetUser(content.Email) + user, err := logic.GetUser(content.UserPrincipalName) if err != nil { handleOauthUserNotFound(w) return diff --git a/auth/github.go b/auth/github.go index 37c66085a..4bcc6753c 100644 --- a/auth/github.go +++ b/auth/github.go @@ -66,7 +66,7 @@ func handleGithubCallback(w http.ResponseWriter, r *http.Request) { return } } - user, err := logic.GetUser(content.Email) + user, err := logic.GetUser(content.Login) if err != nil { handleOauthUserNotFound(w) return