From 5eb0c18426f0a8639d2e60ab082452a31ee9b7e4 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Tue, 19 Jan 2021 02:19:36 +0800 Subject: [PATCH] fix(cloudid): azure saml confirm --- pkg/cloudid/saml/providers/azure/driver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cloudid/saml/providers/azure/driver.go b/pkg/cloudid/saml/providers/azure/driver.go index b1d07ae39d..9076043eb1 100644 --- a/pkg/cloudid/saml/providers/azure/driver.go +++ b/pkg/cloudid/saml/providers/azure/driver.go @@ -18,6 +18,7 @@ import ( "context" "database/sql" "fmt" + "strings" "yunion.io/x/pkg/errors" @@ -95,7 +96,7 @@ func (d *SAzureSAMLDriver) GetSpInitiatedLoginData(ctx context.Context, userCred } for i := range samlUsers { - if samlUsers[i].OwnerId == userCred.GetUserId() && samlUsers[i].Email == sp.Username { + if samlUsers[i].OwnerId == userCred.GetUserId() && strings.ToLower(samlUsers[i].Email) == strings.ToLower(sp.Username) { err := samlUsers[i].SyncAzureGroup() if err != nil {