- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#body.aspect_1)
- [InlineSource](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#InlineSource)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#InlineSource.SCHEMA_REPRESENTATION)

Updates the User License. This method is used for batch assign/unassign licenses to users.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1beta/{parent=projects/*/locations/*/userStores/*}:batchUpdateUserLicenses`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores#UserStore` resource name, format: `projects/{project}/locations/{location}/userStores/{userStoreId}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "deleteUnassignedUserLicenses": boolean, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "inlineSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#InlineSource`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `deleteUnassignedUserLicenses` | `boolean` Optional. If true, if user licenses removed associated license config, the user license will be deleted. By default which is false, the user license will be updated to unassigned state. |
| Required. The source of the input. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `inlineSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.userStores/batchUpdateUserLicenses#InlineSource`)`` The inline source for the input content for license assignment. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `discoveryengine.userStores.batchUpdateUserLicenses`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## InlineSource

The inline source for the input config for userStores.batchUpdateUserLicenses method.

| JSON representation |
|---|
| ``` { "userLicenses": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/UserLicense`) } ], "updateMask": string } ``` |

| Fields ||
|---|---|
| `userLicenses[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/UserLicense`)`` Required. A list of user licenses to update. Each user license must have a valid `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/UserLicense#FIELDS.user_principal`. |
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. The list of fields to update. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |