Project: doulapilot-prod (1008190227773). Resource: Cloud Run service doulapilot-admin (us-west1) protected by IAP.
We are calling the service programmatically from another Cloud Run service using a Google identity token, per the documented programmatic-access flow. IAP rejects every token with: "Invalid IAP credentials: Invalid bearer token. Invalid JWT audience." (response header x-goog-iap-generated-response: true).
Facts, all verified 3 Dec 2026 ~20:50 PT:
- The OAuth client ID in IAP's own browser sign-in redirect for this resource is 369001918367-t5qrahnqdaasaifvk6akpqkpjk9vli58.apps.googleusercontent.com.
- The caller is service account doulapilot-intake-relay@doulapilot-prod.iam.gserviceaccount.com (unique ID 102235443082418518609). gcloud iap web get-iam-policy for the resource lists it with roles/iap.httpsResourceAccessor.
- A token minted for that account with that exact audience (decoded claims): aud = the client ID above, email = the service account address, email_verified = true, iss = https://accounts.google.com, sub = 102235443082418518609. Presented within its validity window, it is rejected with the audience error above.
- A token minted without the email claim is rejected earlier with "JWT 'email' claim isn't a string", confirming the audience failure occurs after the email stage, on a token whose aud demonstrably matches.
Question: what audience value does IAP expect for programmatic tokens to this Cloud Run resource, if not the client ID in its own redirect?
