[keycloak-dev] Possible BUG creating User via REST API

Maurício Giacomini Penteado mauriciogiacomini at hotmail.com
Thu Sep 29 16:23:14 EDT 2016

Hi Sebastien, thanks for answering.

I am trying your code but, I always receive a "Failed executing GET /admin/realms/SGCD/users: org.jboss.resteasy.spi.UnauthorizedException: Bearer".

Please, you know if Is there some way for I  put my bearer token on resetPassword call or on KeycloakBuilder?

I have tried using:

       ResteasyClient resteasyClient = new ResteasyClientBuilder()

De: Sebastien Blanc <sblanc at redhat.com>
Enviado: quinta-feira, 29 de setembro de 2016 14:08
Para: Maurício Giacomini Penteado
Assunto: Re: [keycloak-dev] Possible BUG creating User via REST API

Hi Mauricio,

This is not a bug, you need to reset the password after that the user has been created, using something like :

CredentialRepresentation credentials = new CredentialRepresentation();


On Thu, Sep 29, 2016 at 3:51 PM, Maurício Giacomini Penteado <mauriciogiacomini at hotmail.com<mailto:mauriciogiacomini at hotmail.com>> wrote:

Hello everybody,

All times that I create an user via REST API I have to do login on keycloak using  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.

I am using the follow code to create an user via REST API:
                CredentialRepresentation credential = new     CredentialRepresentation();

UserRepresentation user = new UserRepresentation();

Response result = kc.realm("rest-example").users().create(user);

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.

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?

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.


keycloak-dev mailing list
keycloak-dev at lists.jboss.org<mailto:keycloak-dev at lists.jboss.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160929/656e8736/attachment.html 

More information about the keycloak-dev mailing list