<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>JIRA issue created for this topic:<br><a href="https://issues.jboss.org/browse/KEYCLOAK-2217">https://issues.jboss.org/browse/KEYCLOAK-2217</a><br><br></div>But please check another new JIRA issues handling &quot;Update User&quot; scenarios:<br></div><br><a href="https://issues.jboss.org/browse/KEYCLOAK-2216">https://issues.jboss.org/browse/KEYCLOAK-2216</a> : Update User (admin REST API): some attributes added via POST/PUT method are deleted.<br><br><a href="https://issues.jboss.org/browse/KEYCLOAK-2218">https://issues.jboss.org/browse/KEYCLOAK-2218</a> : Update User (Attribute &quot;enabled&quot; via Admin REST API): JSON body without attribute &quot;username&quot; causes HTTP 500 - Internal Server Error<br></div><br>Best Regards,<br></div>Juraj<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-10 16:30 GMT+01:00 Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>I think it should be same consistent
      behaviour on all places. Probably we should make it to what is
      used for clients (id is allowed) and improve realms and users to
      allow it too.<br>
      <br>
      Feel free to create JIRA for this.<br>
      <br>
      Marek<div><div class="h5"><br>
      <br>
      On 10/12/15 14:24, Juraj Janosik wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>Hi all,<br>
            <br>
          </div>
          please, could somebody clarify issue (see bottom of the mail)
          discovered in version 1.6.1.Final?<br>
          The same behavior is detected in version 1.7.0.Final.<br>
          <br>
        </div>
        <div>This behavior differs from a Create a New User where the
          JSON body parameter &quot;id&quot; is skipped.<br>
        </div>
        <div><br>
          Thanks a lot.<br>
          <br>
        </div>
        <div>Best regards,<br>
        </div>
        <div>Juraj<br>
        </div>
        <div>
          <div>
            <div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">2015-11-12 10:32 GMT+01:00
                  Juraj Janosik <span dir="ltr">&lt;<a href="mailto:juraj.janosik77@gmail.com" target="_blank"></a><a href="mailto:juraj.janosik77@gmail.com" target="_blank">juraj.janosik77@gmail.com</a>&gt;</span>:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>Hi,<br>
                            </div>
                            I want to clarify the &quot;Create a new client&quot;
                            via REST API <br>
                            especially for body parameter &quot;id&quot; from
                            &quot;ClientRepresentation&quot;.<br>
                          </div>
                        </div>
                        If I set the parameter &quot;id&quot; in the request body
                        (see example below), <br>
                        the value is set to the client. No new id value
                        is generated for the client, which is the
                        typically behavior of &quot;<a href="http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_role_for_the_realm_or_client" target="_blank">Create a new role for the
                          realm or client</a>&quot; and &quot;<a href="http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_user" target="_blank">Create a new user</a>&quot;.<br>
                      </div>
                      <div>Is this a correct behavior?<br>
                      </div>
                      <div><br>
                        Tested data example:<br>
                        &quot;Create Client&quot;:<br>
&quot;method&quot;:&quot;POST&quot;,&quot;url&quot;:&quot;&lt;URL&gt;:&lt;PORT&gt;/auth/admin/realms/&lt;REALM&gt;/clients&quot;<br>
                      </div>
                      <div>&quot;body&quot;:<br>
                        &quot;{<br>
                        &quot;id&quot;:&quot;3&quot;,<br>
                        &quot;clientId&quot;:&quot;testclient-3&quot;,<br>
                        &quot;name&quot;: &quot;testclient-3&quot;,<br>
                        &quot;description&quot;: &quot;TESTCLIENT-3&quot;,<br>
                        &quot;enabled&quot;: true,<br>
                        &quot;redirectUris&quot;:[ &quot;\\&quot; ],<br>
                        &quot;publicClient&quot;: true<br>
                        }&quot;<br>
                      </div>
                      <div>&quot;headers&quot;:<br>
                        [[&quot;Content-Type&quot;,&quot;application/json&quot;],<br>
                        [&quot;Authorization&quot;,&quot;Bearer &lt;ACCESS_TOKEN&gt;]]<br>
                        <br>
                        Output for GET clients looks like:<br>
                         {<br>
                                &quot;<b>id&quot;: &quot;3&quot;</b>,<br>
                                &quot;clientId&quot;: &quot;testclient-3&quot;,<br>
                                &quot;name&quot;: &quot;testclient-3&quot;,<br>
                                &quot;description&quot;: &quot;TESTCLIENT-3&quot;,<br>
                                &quot;surrogateAuthRequired&quot;: false,<br>
                                &quot;enabled&quot;: true,<br>
                                &quot;clientAuthenticatorType&quot;:
                        &quot;client-secret&quot;,<br>
                                &quot;redirectUris&quot;:<br>
                                [<br>
                                    &quot;\&quot;<br>
                                ],<br>
                                &quot;webOrigins&quot;:<br>
                                [<br>
                                ],<br>
                                &quot;notBefore&quot;: 0,<br>
                                &quot;bearerOnly&quot;: false,<br>
                                &quot;consentRequired&quot;: false,<br>
                                &quot;serviceAccountsEnabled&quot;: false,<br>
                                &quot;directGrantsOnly&quot;: false,<br>
                                &quot;publicClient&quot;: true,<br>
                                &quot;frontchannelLogout&quot;: false,<br>
                                &quot;attributes&quot;:<br>
                                {<br>
                                },<br>
                        ...<br>
                        <br>
                        Thanks a lot.<br>
                        <br>
                      </div>
                      <div>Best Regards,<br>
                      </div>
                      <div>Juraj<br>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>