Disable a service account
You can disable a service account to temporarily prevent it from authenticating.
Before you begin Copy linkLink copied!
- A service account exists in the target project.
- You have the
service_account:disablepermission, or you are a project administrator.
About this task Copy linkLink copied!
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 Copy linkLink copied!
Results Copy linkLink copied!
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 Copy linkLink copied!
You can re-enable a disabled service account to restore its ability to authenticate.
Before you begin Copy linkLink copied!
- 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.