I follow this answer How to create user with role(s) through REST service?

{"name":"user343","pass":"kes35@r4","mail":"[email protected]","status":"1", "roles":["4"]}

But When I check the created user, It role still is '2' (authenticated user)

2 Answers 2


Just install Auto Assign Role Module.

Then use this following json code:

{"name":"user3431","pass":"kes35@r4","mail":"[email protected]","status":"1", "user_roles":{"6"}}

Same issue occured with me. I used rules module to assign a role on user account creation based on certain field data.Hope it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.