Skip to content

BigQueryCredentialsConfig fails to refresh #2981

@flooreigenhuisgoogle

Description

@flooreigenhuisgoogle

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
When we deploy an agent to Agent Engine with the BigQueryToolset AND BigQueryCredentialsConfig like in the docs, with a service account attached to it, initially it works, confirmed it has access to BigQuery. After 12 hrs or so, it loses access to BigQuery as if the token is not refreshed. We request the credentials through application default credentials.

When we deploy without the BigQueryCredentialsConfig in the BigQueryToolSet it works fine, even after a longer period of time.

To Reproduce
Deploy a simple agent, like so: https://google.github.io/adk-docs/tools/built-in-tools/#bigquery. Attach a custom service account to it with proper BQ permissions.

Deploy it to Agent Engine. Query it with any question that triggers any tool in the BQ toolset. Confirm it works. Wait until the next day. Query it again with the same question and confirm it doesn't work.

The agent the next day returns with tool call adk_request_credential.

Expected behavior
It will respond in a similar fashion.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. macOS, Linux, Windows]: Agent Engine, querying from MacOS
  • Python version(python -V): 3.13.7
  • ADK version(pip show google-adk): 1.14.0

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used(e.g. gemini-2.5-pro): gemini-2.5-pro & gemini-2.5-flash

Additional context
When I update the agent with the BigQueryCredentialsConfig the next day, keeping all the code the same, with the same service account, it works again

Metadata

Metadata

Assignees

Labels

needs review[Status] The PR/issue is awaiting review from the maintainertools[Component] This issue is related to tools

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions