Method: projects.serviceAccounts.undelete

Stay organized with collections Save and categorize content based on your preferences.

Restores a deleted ServiceAccount.

Important: It is not always possible to restore a deleted service account. Use this method only as a last resort.

After you delete a service account, IAM permanently removes the service account 30 days later. There is no way to restore a deleted service account that has been permanently removed.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



The resource name of the service account in the following format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}. Using - as a wildcard for the PROJECT_ID will infer the project from the account.

Authorization requires the following IAM permission on the specified resource name:

  • iam.serviceAccounts.undelete

Request body

The request body must be empty.

Response body

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

JSON representation
  "restoredAccount": {
    object (ServiceAccount)

object (ServiceAccount)

Metadata for the restored service account.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.