<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
If you pass in temporary = false in the json rep, then it won't set
up the required action.<br>
<br>
<div class="moz-cite-prefix">On 3/4/2016 9:22 PM, Chris Hairfield
wrote:<br>
</div>
<blockquote
cite="mid:CALr83iD1fT0Ef+JR=4Kjr_hb-ztqXUCz9peEhOaPNCTRYGwwkQ@mail.gmail.com"
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 moz-do-not-send="true"
href="mailto:thiagoleocosta@gmail.com">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
moz-do-not-send="true"
href="http://localhost:8080/auth" target="_blank"><a class="moz-txt-link-freetext" href="http://localhost:8080/auth">http://localhost:8080/auth</a></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 moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Bill Burke
JBoss, a division of Red Hat
<a class="moz-txt-link-freetext" href="http://bill.burkecentral.com">http://bill.burkecentral.com</a></pre>
</body>
</html>