[keycloak-dev] Create User with REST API from Java

H Mahey harshmahey at msn.com
Wed Jul 29 01:27:31 EDT 2015


Hi guys,I apologize if i am not suppose to set communication to the whole group like this.I am not able to start a thread in the key cloak forum so am trying this option.
I am new to Keycloak and trying to create a user via REST call and i am getting 401 Unauthorized error.So this what i am trying to do1. Start the Keycloak server 2. Create a realm- test-realm and assigned manag-user role to it3. Create user "test-realm-user01" and assigned all the roles i could to him.4. In my java code, i get a token and then i am trying to create a user using that token and it throws 401
Attached is the code of what i am doing.
Please let me know if i am doing anything wrong here.
(I understand that we should UI from doing all the stuff..but here i am that i want to try this out)











 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150728/3846c5a9/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KeyCloakAdminAdapter.java
Type: application/octet-stream
Size: 6622 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150728/3846c5a9/attachment.obj 


More information about the keycloak-dev mailing list