[keycloak-user] Create User using REST API- 401 Error

Bill Burke bburke at redhat.com
Wed Jul 29 12:05:42 EDT 2015


Does your client have the necessary scope? If it does not, then the 
token won't have the relevant permissions.

On 7/29/2015 9:54 AM, H Mahey wrote:
> I am trying to create a user via REST call and i am getting 401
> Unauthorized error.
> So this what i am trying to do
> 1. Start the Keycloak server
> 2. Create a realm- test-realm and assigned manag-user role to it
> 3. 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)
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-user mailing list