Keycloak 24 and later treat email, firstName and lastName as profile attributes. Once an update request carries an attribute map, every one of them missing from the body is deleted. Since #3624171 every update of an account that has
attributes carries the map, so a first or last name that is not mapped from Drupal is removed by any save of the user. Reproduced on Keycloak 26 with 1.0.12.

Fix: the update carries over email, firstName and lastName from the account (lookup result or the account read already made for the attributes) whenever it does not set them itself. Mapped names still come from Drupal. Unit tests added.

Comments

roromedia created an issue. See original summary.

  • 7f88d60e committed on 1.0.x
    Issue #3630298 by roromedia: Saving a user wipes the first and last name...
roromedia’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.