Hmm maybe I missed something last night. Was reading the admin JavaDoc and it showed a different method. I'll let you know later. <div><br></div><div>Thanks!<span></span><br><br>On Thursday, May 21, 2015, Marek Posolda <<a href="mailto:mposolda@redhat.com">mposolda@redhat.com</a>> 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">
<div>Hmm... Isn't this method on
UserResource useful for this:
<a href="https://github.com/keycloak/keycloak/blob/master/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java#L46" target="_blank">https://github.com/keycloak/keycloak/blob/master/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java#L46</a>
?<br>
<br>
For permanent password, I think you can just set flag
"setTemporary(false)" on CredentialRepresentation.<br>
<br>
Marek<br>
<br>
On 21.5.2015 15:17, Scott Rossillo wrote:<br>
</div>
<blockquote type="cite">Thanks the admin client in 1.2.0.Final doesn't have a
way to make that call. I can do it manually but is there a way to
make the password permanent, not temporary? This is for account
migration purposes.<br>
<br>
On Thursday, May 21, 2015, Marek Posolda <<a href="javascript:_e(%7B%7D,'cvml','mposolda@redhat.com');" target="_blank">mposolda@redhat.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Once you create user through admin endpoint, you will need to
call another rest endpoint to update his password. It should be
this endpoint: <a href="http://keycloak.github.io/docs/rest-api/admin/realms/%7Brealm%7D/users/%7Busername%7D/reset-password/index.html" target="_blank">http://keycloak.github.io/docs/rest-api/admin/realms/%7Brealm%7D/users/%7Busername%7D/reset-password/index.html</a><br>
<br>
Marek<br>
<br>
On 21.5.2015 01:06, Scott Rossillo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
We’re using the admin client to create users in 1.2.0.Final.
The call works, but the credentials are missing.<br>
<br>
List<CredentialRepresentation> credentialsList = new
ArrayList<>();<br>
CredentialRepresentation credentials = new
CredentialRepresentation();<br>
<br>
credentials.setType(CredentialRepresentation.PASSWORD);<br>
credentials.setValue(appUser.getPassword());<br>
<br>
credentialsList.add(credentials);<br>
user.setCredentials(createCredentials(source));<br>
<br>
I see the credentials getting passed on the create user HTTP
POST, but the CREDENTIALS table doesn’t contain an entry for
the user.<br>
<br>
Any suggestions?<br>
<br>
Best,<br>
Scott<br>
<br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a>keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</div>
</blockquote></div>