Attach or replace the roles of a source user to another destination user

Searching through the username and authenticator from the UserKey object, clone roles from source user to destination user. If replaceExistingRoles param is true, replace operation is executed. Otherwise, attach operation is executed. The new roles list that the destination user now has is returned.

Request
Security:
vc-security
Request Body schema: application/json
object (UserKey)
object (UserKey)
replaceExistingRoles
boolean
Default: false
Responses
200

The new destination user role list

401

Unauthorized request. Make sure token was included and is valid and try again.

403

Forbidden. You are not permitted to access the requested resource.

404

Not Found. The specified resource (or resource referred to by id) was not found

post/user-service/v1/user/role/clone
Request samples
application/json
{
  • "userKeySource": {
    },
  • "userKeyDestination": {
    },
  • "replaceExistingRoles": false
}
Response samples
application/json
[
  • {
    }
]