If the service account is already enabled, then this method has no effect.
If the service account was disabled by other means—for example, if Google disabled the service account because it was compromised—you cannot use this method to enable the service account.
HTTP request
POST https://iam.googleapis.com/v1/{name=projects/*/serviceAccounts/*}:enable
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.enable
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 enabling a disabled ServiceAccount using the \u003ccode\u003eserviceAccounts.enable\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST method directed to a specific URL using gRPC Transcoding syntax, and requires an empty request body.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e parameter in the URL specifies the service account to enable and supports various formats, including wildcard characters, although they should be used with caution.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful execution results in an empty JSON object as a response, indicating that the service account has been enabled.\u003c/p\u003e\n"],["\u003cp\u003eEnabling a service account requires specific authorization scopes, either \u003ccode\u003ehttps://www.googleapis.com/auth/iam\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.serviceAccounts.enable\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\nEnables a [ServiceAccount](/iam/docs/reference/rest/v1/projects.serviceAccounts#ServiceAccount) that was disabled by [serviceAccounts.disable](/iam/docs/reference/rest/v1/projects.serviceAccounts/disable#google.iam.admin.v1.IAM.DisableServiceAccount).\n\nIf the service account is already enabled, then this method has no effect.\n\nIf the service account was disabled by other means---for example, if Google disabled the service account because it was compromised---you cannot use this method to enable the service account.\n\n### HTTP request\n\n`POST https://iam.googleapis.com/v1/{name=projects/*/serviceAccounts/*}:enable`\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)."]]