diff --git a/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/UserAttributeMapper.java b/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/UserAttributeMapper.java index 9834352b74..8d5ccf7532 100755 --- a/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/UserAttributeMapper.java +++ b/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/UserAttributeMapper.java @@ -98,7 +98,7 @@ public class UserAttributeMapper extends AbstractIdentityProviderMapper { for (AttributeStatementType.ASTChoiceType choice : statement.getAttributes()) { AttributeType attr = choice.getAttribute(); if (name != null && !name.equals(attr.getName())) continue; - if (friendly != null && !name.equals(attr.getFriendlyName())) continue; + if (friendly != null && !friendly.equals(attr.getFriendlyName())) continue; List attributeValue = attr.getAttributeValue(); if (attributeValue == null || attributeValue.isEmpty()) return null;