diff --git a/src/Web/Masa.Auth.Web.Sso/Infrastructure/Services/UserProfileService.cs b/src/Web/Masa.Auth.Web.Sso/Infrastructure/Services/UserProfileService.cs index 3e9e76faf..7959e6686 100644 --- a/src/Web/Masa.Auth.Web.Sso/Infrastructure/Services/UserProfileService.cs +++ b/src/Web/Masa.Auth.Web.Sso/Infrastructure/Services/UserProfileService.cs @@ -25,7 +25,10 @@ public async Task GetProfileDataAsync(ProfileDataRequestContext context) var claimValues = await _authClient.UserService.GetClaimValuesAsync(userId); foreach (var claimValue in claimValues) { - context.IssuedClaims.TryAdd(new Claim(claimValue.Key, claimValue.Value)); + if (!context.IssuedClaims.Any(x=>x.Type == claimValue.Key)) + { + context.IssuedClaims.TryAdd(new Claim(claimValue.Key, claimValue.Value)); + } } } }