# Method: users.bulkEditAssignedUserRoles

> [!WARNING]
> Display \& Video 360 API v3 has sunset. Use [v4](https://developers.google.com/display-video/api/reference/rest/v4) instead.

- [HTTP request](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.request_body)
  - [JSON representation](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.response_body)
  - [JSON representation](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.BulkEditAssignedUserRolesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.aspect)
- [Try it!](https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#try-it)

Bulk edits user roles for a user.

The operation will delete the assigned user roles provided in `https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.request_body.FIELDS.deleted_assigned_user_roles` and then assign the user roles provided in `https://developers.google.com/display-video/api/reference/rest/v3/users/bulkEditAssignedUserRoles#body.request_body.FIELDS.created_assigned_user_roles`.

This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](https://developers.google.com/display-video/api/guides/users/overview#prerequisites) before using this method.

The "Try this method" feature does not work for this method.

### HTTP request

`POST https://displayvideo.googleapis.com/v3/users/{userId}:bulkEditAssignedUserRoles`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `userId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the user to which the assigned user roles belong. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "deletedAssignedUserRoles": [ string ], "createdAssignedUserRoles": [ { object (`https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole`) } ] } ``` |

| Fields ||
|---|---|
| `deletedAssignedUserRoles[]` | `string` The assigned user roles to delete in batch, specified as a list of `https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole.FIELDS.assigned_user_role_id`. The format of assignedUserRoleId is `entityType-entityid`, for example `partner-123`. |
| `createdAssignedUserRoles[]` | ``object (`https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole`)`` The assigned user roles to create in batch, specified as a list of `https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole`. |

### Response body

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "createdAssignedUserRoles": [ { object (`https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole`) } ] } ``` |

| Fields ||
|---|---|
| `createdAssignedUserRoles[]` | ``object (`https://developers.google.com/display-video/api/reference/rest/v3/users#AssignedUserRole`)`` The list of assigned user roles that have been successfully created. This list will be absent if empty. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/display-video-user-management`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).