title: How can I update keycloak's user details programmatically (java), without using rest admin api?
body: <p>I want to update the user detail. e.g. I created user(k1) in "demo" realm from keycloak admin console. I have one java client and I want to update the user(k1) details like. Change Email address of user k1.</p>
  
  <p>I did using Admin client(Rest API) as below.</p>
  
  <pre><code>public void updateEmail(final String newEmailAddress) {
      try {
          final AccessToken accessToken = getToken();
          Keycloak keycloak = KeycloakBuilder.builder().serverUrl(this.getDeployment().getAuthServerBaseUrl())
                  .realm(this.getDeployment().getRealm()).username("k1").password("123").clientId(ADMIN_CLIENT)
                  .resteasyClient(new ResteasyClientBuilder().connectionPoolSize(10).build()).build();
  
          UserResource userResource = keycloak.realm(this.getDeployment().getRealm()).users()
                  .get(accessToken.getSubject());
          UserRepresentation user = userResource.toRepresentation();
          user.setEmail(newEmailAddress);
          userResource.update(user);
  
      } catch (Exception exception) {
          exception.printStackTrace();
      }
  }
  </code></pre>
  
  <p>But I want do the same without using Admin client.</p>