Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-1458

[GHI#28220] Admin API: User PUT operation clears firstname, lastname email fields

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      admin/api

      Describe the bug

      When updating user attributes, you need to send firstName, lastName, email (OPTIONAL fields).
      In the version < 24 we used the admin API to update attributes, when doing the same with version 24.0.2 the API clears the firstname, lastname, email field.

      Version

      24.0.2

      Regression

      [X] The issue is a regression

      Expected behavior

      When updating a user and you dont send OPTIONAL fields, the API should keep the field content of those fields.

      Actual behavior

      The API clears the fields.

      How to Reproduce?

      Send a PUT request to any user api endpoint:
      PUT /admin/realms/

      {realm}

      /users/

      {id}

      `

      { {code}

      "attributes":

      { "test": "1" }
      
      

      }`
      Check the Keycloak user again, firstname, lastname, email are gone

      Anything else?

      No response

            Unassigned Unassigned
            pvlha Pavel Vlha
            Keycloak Core IAM
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: