# Method: accounts.checkCloudIdentityAccountsExist

- [HTTP request](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.CheckCloudIdentityAccountsExistResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#body.aspect)
- [CloudIdentityCustomerAccount](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#try-it)

Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.

Possible error codes:

- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INVALID_VALUE: Invalid domain value in the request.

Return value: A list of `https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount` resources for the domain (may be empty)

Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no `https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount` resources match the domain.

### HTTP request

`POST https://cloudchannel.googleapis.com/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The reseller account's resource name. Parent uses the format: accounts/{account_id} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "domain": string, "primaryAdminEmail": string } ``` |

| Fields ||
|---|---|
| `domain` | `string` Required. Domain to fetch for Cloud Identity account customers, including domain and team customers. For team customers, please use the domain for their emails. |
| `primaryAdminEmail` | `string` Optional. Primary admin email to fetch for Cloud Identity account team customer. |

### Response body

Response message for `https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist`.

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

| JSON representation |
|---|
| ``` { "cloudIdentityAccounts": [ { object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount`) } ] } ``` |

| Fields ||
|---|---|
| `cloudIdentityAccounts[]` | ``object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/checkCloudIdentityAccountsExist#CloudIdentityCustomerAccount`)`` The Cloud Identity accounts associated with the domain. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/apps.order`

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

## CloudIdentityCustomerAccount

Entity representing a Cloud Identity account that may be associated with a Channel Services API partner.

| JSON representation |
|---|
| ``` { "existing": boolean, "owned": boolean, "customerName": string, "customerCloudIdentityId": string, "customerType": enum (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/CloudIdentityInfo#CustomerType`), "channelPartnerCloudIdentityId": string } ``` |

| Fields ||
|---|---|
| `existing` | `boolean` Returns true if a Cloud Identity account exists for a specific domain. |
| `owned` | `boolean` Returns true if the Cloud Identity account is associated with a customer of the Channel Services partner (with active subscriptions or purchase consents). |
| `customerName` | `string` If owned = true, the name of the customer that owns the Cloud Identity account. Customer_name uses the format: accounts/{account_id}/customers/{customer_id} |
| `customerCloudIdentityId` | `string` If existing = true, the Cloud Identity ID of the customer. |
| `customerType` | ``enum (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/CloudIdentityInfo#CustomerType`)`` If existing = true, the type of the customer. |
| `channelPartnerCloudIdentityId` | `string` If existing = true, and is 2-tier customer, the channel partner of the customer. |