> For the complete documentation index, see [llms.txt](https://openapi.logto.io/dev/llms.txt)

# Update roles for a user in an organization

> PUT /api/organizations/{id}/users/{userId}/roles
> 
> Update roles assigned to a user in the specified organization with the provided data.



## Servers
- Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.)


## Authentication methods
- O auth2


## Parameters

### Path parameters

- **id** (string)
  The unique identifier of the organization.

- **userId** (string)
  The unique identifier of the user.



### Body: application/json (object)

- **organizationRoleIds** (array[string])
  An array of organization role IDs to update for the user.

- **organizationRoleNames** (array[string])
  An array of organization role names to update for the user.



## Responses
### 204
Roles were updated for the user successfully.

### 400
Bad Request

### 401
Unauthorized

### 403
Forbidden

### 422
The user is not a member of the organization; or at least one of the IDs provided is not valid. For example, the organization ID or organization role ID does not exist; or at least one of the role names provided is not valid. For example, the organization role name does not exist.


[Powered by Bump.sh](https://bump.sh)
