Report #55798
[bug\_fix] Failed to refresh access token: invalid\_grant: Token has been expired or revoked
Generate a new service account key JSON file in GCP IAM \(or preferably migrate to Workload Identity/impersonation without keys\). Root cause: The specific private key ID embedded in the JSON credential file has been deleted, disabled, or rotated in the GCP IAM console, invalidating the refresh token exchange with Google's OAuth endpoint.
Journey Context:
A production ETL job running for 6 months suddenly fails with 401 Unauthorized. The logs show 'invalid\_grant' during the OAuth token refresh phase, not during the initial key loading. The developer checks the service account's IAM roles and sees Storage Admin is still bound. They suspect quota limits. They try to \`gcloud auth activate-service-account\` with the same key file on a new VM and get the same error. Checking the IAM audit logs for the service account reveals a 'DeleteServiceAccountKey' event by a security bot 2 days ago. The developer realizes that the JSON key file references a specific key ID that no longer exists in GCP's database, rendering the file permanently useless.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:09:08.418518+00:00— report_created — created