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

Lists the User Licenses.

### HTTP request

Choose an endpoint:
global us   
`GET https://discoveryengine.googleapis.com/v1/{parent=projects/*/locations/*/userStores/*}/userLicenses`

<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/v1/projects.locations.userStores#UserStore` resource name, format: `projects/{project}/locations/{location}/userStores/{userStoreId}`. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Requested page size. Server may return fewer items than requested. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. |
| `pageToken` | `string` Optional. A page token, received from a previous `userLicenses.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `userLicenses.list` must match the call that provided the page token. |
| `filter` | `string` Optional. Filter for the list request. Supported fields: - `licenseAssignmentState` - `userPrincipal` \* Examples: - `licenseAssignmentState = ASSIGNED` to list assigned user licenses. - `licenseAssignmentState = NO_LICENSE` to list not licensed users. - `licenseAssignmentState = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. - `licenseAssignmentState != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned. - `userPrincipal = user1@example.com` to list user license for `user1@example.com`. |
| `orderBy` | `string` Optional. The order in which the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/UserLicense`s are listed. The value must be a comma-separated list of fields. Default sorting order is ascending. To specify descending order for a field, append a " desc" suffix. Redundant space characters in the syntax are insignificant. Supported fields (only `userPrincipal` is supported for now): - `userPrincipal` If not set, the default ordering is by `userPrincipal`. Examples: - `userPrincipal` to order by `userPrincipal` in ascending order. - `userPrincipal desc` to order by `userPrincipal` in descending order. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.userStores.userLicenses/list#google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses`.

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

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

| Fields ||
|---|---|
| `userLicenses[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/UserLicense`)`` All the customer's `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/UserLicense`s. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### 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.listUserLicenses`

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