Is defining "roles" : option mandatory while we update user details like email, full_name in kibana user section

32 Views Asked by At

I want to update my full_name and email in User details. When I'm running the command, details are updating as per the request. But whenever I'm running the command without adding "roles" option I'm getting below error. "type" : "action_request_validation_exception", "reason" : "Validation Failed: 1: roles are missing;"

Does giving "roles" option in the command mandatory if we want to update the in-built user details.

POST /_security/user/jacknich { "roles" : [ "admin", "other_role1" ], "full_name" : "Jack Nicholson", "email" : "[email protected]", }

This is the actual command I'm running and the details are getting updated as per the request. But, if I'm running withouth the "roles" option the user details are not updating as per the request. And I'm getting the below error, while running the below command

POST /_security/user/jacknich { "full_name" : "Jack Nicholson", "email" : "[email protected]", }

"type" : "action_request_validation_exception", "reason" : "Validation Failed: 1: roles are missing;"

1

There are 1 best solutions below

0
Alexey Zalyotov On

According to the documentation roles is required attribute:

roles:

(Required, list) A set of roles the user has. The roles determine the user’s access permissions. To create a user without any roles, specify an empty list: [].