<div dir="ltr">We'll fix this in the future so you can do a single post with new user, including credentials and role mappings. For now you'll have to do the two separate requests though.</div><div class="gmail_extra"><br><div class="gmail_quote">On 5 March 2016 at 13:18, Bill Burke <span dir="ltr"><<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
If you pass in temporary = false in the json rep, then it won't set
up the required action.<div><div class="h5"><br>
<br>
<div>On 3/4/2016 9:22 PM, Chris Hairfield
wrote:<br>
</div>
<blockquote type="cite">
<p dir="ltr">I've been encountering the same issue with 1.4.0 and
1.6.1 and assume it's by design. I believe I've come across past
threads confirming this.</p>
<p dir="ltr">My solution is to first create the user, then hit the
reset password API, and, as a final and optional step, update
the user with an empty requiredActions array to clear the Update
Password action inherent in the reset password flow.</p>
<p dir="ltr">Hopefully someone that is more sure can step in to
confirm.</p>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Mar 4, 2016, 11:38 AM Thiago Leonardo
<<a href="mailto:thiagoleocosta@gmail.com" target="_blank">thiagoleocosta@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default">
<div class="gmail_default"><font face="verdana,
sans-serif">Hi,</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">I'am trying create a new user in
admin-client, but the credentials are not saved.</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">The new user is saved normaly. </font><span style="font-family:verdana,sans-serif">Can you help me
?</span></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">My code is:</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">
<div class="gmail_default">Keycloak kc =
KeycloakBuilder.builder()</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.serverUrl("<a href="http://localhost:8080/auth" target="_blank"></a><a href="http://localhost:8080/auth" target="_blank">http://localhost:8080/auth</a>")</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.realm("Realm")</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.username(username)</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.password(password)</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.clientId("admin-cli")</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.resteasyClient(
new
ResteasyClientBuilder().connectionPoolSize(10).build()
)</div>
<div class="gmail_default"><span style="white-space:pre-wrap">        </span>.build();</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">
<div class="gmail_default">UserRepresentation
newUser = new UserRepresentation();</div>
<div class="gmail_default">newUser.setUsername(user.getEmail());</div>
<div class="gmail_default">newUser.setFirstName(user.getName());</div>
<div class="gmail_default">newUser.setEmail(usuario.getEmail());</div>
<div class="gmail_default">newUser.setEnabled(true);</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">
<div class="gmail_default">CredentialRepresentation
credential = new CredentialRepresentation();</div>
<div class="gmail_default">credential.setType(CredentialRepresentation.PASSWORD);</div>
<div class="gmail_default">credential.setValue(user.getEmail());</div>
<div class="gmail_default">credential.setTemporary(true);<br>
</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">newUser.setCredentials(Arrays.asList(credential));<br>
</div>
</div>
<div class="gmail_default">kc.realm("Realm").users().create(newUser);<br>
</div>
</div>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">Regards,</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="verdana,
sans-serif">Thiago</font></div>
</div>
</div>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></blockquote>
</div>
<br>
<fieldset></fieldset>
<br>
<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></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Bill Burke
JBoss, a division of Red Hat
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a></pre>
</font></span></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>