I m trying to use a create user api to accept roles along with other user parameters

{
	"user":{
		"username":"xyz",
		"email":"xyz@blah.com",
		"password":"123456",
		"role_ids":[1,2]
	}
}

trying with the above json request, but doesn’t seems to work- using the adonis-acl for managing roles and permissions.
My need is to pass the associated roles along with user creation.

Hi @Sonal

Take a look at Adonis Persona.

B/R

Did you try using associate?
https://adonisjs.com/docs/4.1/relationships#_associate

adonis-acl outlines the same as well.

used sync method and was able to achieve desired results.