Method: projects.tenants.accounts.batchDelete

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.

HTTP request

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

The URL uses gRPC Transcoding 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 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 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.