# Method: projects.tenants.accounts.batchDelete

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

Batch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response. The method ignores accounts that do not exist or are duplicated in the request.

This method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control).

### HTTP request

`POST https://identitytoolkit.googleapis.com/v1/projects/{targetProjectId}/tenants/{tenantId}/accounts:batchDelete`

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

### Path parameters

| Parameters ||
|---|---|
| `targetProjectId` | `string` If `tenantId` is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that accounts belong to. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `targetProjectId`: - `firebaseauth.users.delete` |
| `tenantId` | `string` If the accounts belong to an Identity Platform tenant, the ID of the tenant. If the accounts belong to a default Identity Platform project, the field is not needed. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "localIds": [ string ], "force": boolean } ``` |

| Fields ||
|---|---|
| `localIds[]` | `string` Required. List of user IDs to be deleted. |
| `force` | `boolean` Whether to force deleting accounts that are not in disabled state. If false, only disabled accounts will be deleted, and accounts that are not disabled will be added to the `errors`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/identity-platform/docs/reference/rest/v1/BatchDeleteAccountsResponse`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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