Disable a service account
You can disable a service account to temporarily prevent it from authenticating.
Before you begin
- A service account exists in the target project.
- You have the
service_account:disablepermission, or you are a project administrator.
About this task
Use this option when you need to temporarily revoke access, such as during a security investigation or while an integration is offline for maintenance.
To identify service accounts that are no longer in use, check the last_authenticated_at field in the service account detail response. A null value indicates that the service account has never authenticated.
Procedure
Results
When you disable a service account:
- All tokens previously issued to the service account are immediately rejected.
- The service account cannot request new tokens.
- The service account's credentials and role assignments are preserved.
Re-enable a disabled service account
You can re-enable a disabled service account to restore its ability to authenticate.
Before you begin
- A service account exists in the target project and has a status of
disabled. - You have the
service_account:enablepermission, or you are a project administrator.