Warning: After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use serviceAccounts.disable instead.
If you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request.
To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use serviceAccounts.disable to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.
As an alternative, you can use the - wildcard character instead of the project ID:
projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not
Found error.
Authorization requires the following IAM permission on the specified resource name:
iam.serviceAccounts.delete
Request body
The request body must be empty.
Response body
If successful, the response body is an empty JSON object.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-21 UTC."],[[["\u003cp\u003eThis document outlines the process for deleting a Service Account, emphasizing that deletion is often irreversible after 30 days.\u003c/p\u003e\n"],["\u003cp\u003eIt strongly recommends disabling a service account using \u003ccode\u003eserviceAccounts.disable\u003c/code\u003e and monitoring for unintended consequences for at least 24 hours before proceeding with deletion.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for deletion is a \u003ccode\u003eDELETE\u003c/code\u003e operation directed at a specific service account identified by its \u003ccode\u003ename\u003c/code\u003e within the URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request body for deleting a service account must be empty, and a successful response is also an empty JSON object.\u003c/p\u003e\n"],["\u003cp\u003eThe deletion requires the \u003ccode\u003eiam.serviceAccounts.delete\u003c/code\u003e IAM permission and either the \u003ccode\u003ehttps://www.googleapis.com/auth/iam\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.serviceAccounts.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nDeletes a [ServiceAccount](/iam/docs/reference/rest/v1/projects.serviceAccounts#ServiceAccount).\n\n**Warning:** After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use [serviceAccounts.disable](/iam/docs/reference/rest/v1/projects.serviceAccounts/disable#google.iam.admin.v1.IAM.DisableServiceAccount) instead.\n\nIf you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request.\n\nTo help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use [serviceAccounts.disable](/iam/docs/reference/rest/v1/projects.serviceAccounts/disable#google.iam.admin.v1.IAM.DisableServiceAccount) to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.\n\n### HTTP request\n\n`DELETE https://iam.googleapis.com/v1/{name=projects/*/serviceAccounts/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/iam`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]