I'm using Drupal 8 rest service to register a new anonymous user and it works fine; the user is created in Drupal.
Then I tried to specify a custom role sending the request below
{
"name": { "value": "FooBar" },
"mail": { "value": "foo@bar.com" },
"pass": { "value": "secretSauce" },
"roles": [
"my_role"
]
}
but I receive the error
{
"message": "Access denied on creating field 'roles'."
}
I checked permissions but I'm not getting what is missing.