- URL:
- https://<root>/security/users/assignRoles
- Methods:
- POST
- Required Capability:
- Access allowed with either the "Update", "Delete", "Security and Infrastructure", or "Servers" privileges
- Version Introduced:
- 10.1
Description
The assign operation assigns roles to a user account when working with a user and role store that support reads and writes. By assigning a role to a user, the user account automatically inherits all the permissions that have been assigned to the role.
Request parameters
| Parameter | Details | 
|---|---|
| 
 | The name of the user. Example  | 
| 
 | A comma-separated list of role names. Each of the listed role names must exist in the role store. Example  | 
| 
 | The response format. The default response format is  Values:  | 
Example usage
The following is a sample POST request for the assign operation:
POST /<context>/admin/security/users/assignRoles HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
username=jwhite&roles=editors,planners&f=pjsonJSON Response example
{"status": "success"}