# Method: services.tenancyUnits.list

- [HTTP request](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.request_body)
- [Response body](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.ListTenancyUnitsResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits/list#try-it)

Find the tenancy unit for a managed service and service consumer. This method shouldn't be used in a service producer's runtime path, for example to find the tenant project number when creating VMs. Service producers must persist the tenant project's information after the project is created.

### HTTP request

`GET https://serviceconsumermanagement.googleapis.com/v1/{parent=services/*/*/*}/tenancyUnits`

The URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Managed service and service consumer. Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a service, such as 'service.googleapis.com'. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource `parent`: - `serviceconsumermanagement.tenancyu.list` |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` Filter expression over tenancy resources field. Optional. |
| `pageSize` | `integer` The maximum number of results returned by this request. |
| `pageToken` | `string` The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains data with the following structure:
Response for the list request.

| JSON representation ||
|---|---|
| ``` { "tenancyUnits": [ { object (`https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits#TenancyUnit`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `tenancyUnits[]` | ``object (`https://docs.cloud.google.com/service-infrastructure/docs/service-consumer-management/reference/rest/v1/services.tenancyUnits#TenancyUnit`)`` Tenancy units matching the request. |
| `nextPageToken` | `string` Pagination token for large results. |

### Authorization Scopes

Requires the following OAuth scope:

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

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

## Try it!