public void RemoveNoIdentityClaims() { if (UserClaims == null) { return; } for (var i = UserClaims.Count - 1; i >= 0; i--) { var claim = UserClaims.ElementAt(i); if (claim.ClaimType != "given_name") { UserClaims.Remove(claim); } } }