diff --git a/pkg/coredata/membership_profile.go b/pkg/coredata/membership_profile.go index 49854d563..a38673446 100644 --- a/pkg/coredata/membership_profile.go +++ b/pkg/coredata/membership_profile.go @@ -507,7 +507,7 @@ SELECT p.id, p.identity_id, p.organization_id, - i.email_address, + '' AS email_address, p.source, p.state, p.full_name, @@ -540,8 +540,6 @@ SELECT p.updated_at FROM iam_membership_profiles p -INNER JOIN identities i - ON i.id = p.identity_id WHERE p.%s AND p.organization_id = @organization_id diff --git a/pkg/iam/log_export_csv.go b/pkg/iam/log_export_csv.go index e4ad63faf..01d79176f 100644 --- a/pkg/iam/log_export_csv.go +++ b/pkg/iam/log_export_csv.go @@ -331,7 +331,7 @@ func loadSCIMProfileExportInfo( key := strings.ToLower(*profile.UserName) result[key] = scimProfileExportInfo{ - email: profile.EmailAddress.String(), + email: scimEmailFromUserName(*profile.UserName), fullName: profileFullName(profile), } }