<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div><span style="font-size: 12pt;">
<div>Hello everybody,</div>
<div><br>
</div>
<div>All times that I create an user via REST API I have to do login on keycloak using &nbsp;administrator account and have to update the credentials from user created via REST API with temporary password setted to false. Just if I do these procedures I can do login
 on my app using the user created via REST API.</div>
<div><br>
</div>
<div>I am using the follow code to create an user via REST API:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .....</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CredentialRepresentation credential = new &nbsp; &nbsp; CredentialRepresentation();</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>credential.setType(CredentialRepresentation.PASSWORD);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>credential.setValue(&quot;test123&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>credential.setTemporary(false);</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>UserRepresentation user = new UserRepresentation();</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>user.setUsername(&quot;testuser&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>user.setFirstName(&quot;Test&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>user.setLastName(&quot;User&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>user.setCredentials(<span>Arrays.</span>asList(credential));</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>user.setEnabled(true);</div>
<div></div>
<div><br>
</div>
<div></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Response result = kc.realm(&quot;rest-example&quot;).users().create(user);</div>
<div><br>
</div>
<div>I have setted on code false for temporary credential and user as enabled, even so, I can not do login on my application using the created user without do the procedures that I wrote at the beginning of this issue.</div>
<div><br>
</div>
<div>I think that REST API is not respecting the properties of temporary credential setted to false and user setted as enabled. It can be a BUG?</div>
<div><br>
</div>
<div>If anybody knows how can I update the credentials from a new user created via REST API leaving it able to do login on my application please let me know.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Maurício.</div>
</span></div>
<br>
<p></p>
</div>
</body>
</html>