Connect BigQuery with Sign in with Google

Last updated:

Read as Markdown

With Sign in with Google, each Project Member who runs a Request on the BigQuery datasource uses their own Google account. Their Ekaya Role determines which Requests they can run, and BigQuery IAM determines what their Google account can access. This method uses no service account key.

Sign in with Google requires a Cloud deployment with a configured Request Service. If Authentication Method does not list Sign in with Google when you add a BigQuery datasource, this deployment cannot hold personal sign-ins.

Get the redirect URI from Ekaya Admin

In Ekaya Admin, add a BigQuery datasource and choose Authentication Method → Sign in with Google. Under Set up Google OAuth, copy the Authorized redirect URI. It has the form <Request Service public URL>/oauth/connector/callback.

Create your Google OAuth client

  1. In Google Cloud Console, select a Google Cloud project that belongs to your organization. In Google Auth Platform, configure the app's branding and consent screen. For an organization-only setup, choose Internal under Audience. Google's consent screen instructions
  2. In Google Auth Platform → Clients, select Create client, choose Web application, and give it a name. Leave Authorized JavaScript origins blank. Under Authorized redirect URIs, paste the exact URI you copied from Ekaya Admin. Google's OAuth client instructions
  3. Create the client. Copy the client ID and save the client secret securely before closing Google's creation dialog. Google shows the full secret only when it is created. The Request Service asks for it after you save the datasource. Google's client secret visibility policy

An Internal audience limits sign-in to your Google Workspace or Cloud Identity organization. Google exempts apps in organization-owned projects with this audience from sensitive- and restricted-scope verification. An External app is subject to Google's verification requirements for the scopes it requests. Google's Internal audience requirements and OAuth verification policy

Workspace administrators can still restrict access by OAuth client ID. Google Workspace app access controls

Create and connect the BigQuery datasource

Return to the BigQuery datasource form in Ekaya Admin. The method, client ID, and scope are fixed at creation. Create a new datasource to change any of them.

Field What to enter
Google OAuth Client ID The client ID you created in Google Auth Platform.
Project ID The GCP project that owns the BigQuery data. The key file names it, so it can be filled from the key.
Default Dataset Scope discovery to one dataset. Choose one with at most 200 tables visible to the Google account used for each assessment, excluding views and materialized views.
Location Pins query jobs to one region. Left blank, BigQuery routes by the tables a query reads.
Job/Billing Project ID The project that runs and is billed for query jobs. Defaults to the Project ID.
Max Bytes Billed Optional cost cap applied to user statements.

For Sign in with Google, enter Project ID manually. Use the project containing the BigQuery data, even if you created the OAuth client in a different project.

If the selected dataset exceeds the 200-table limit, the assessment fails before probing any of its tables for IAM permissions. The limit applies at setup and on every later assessment, including when another Administrator edits or tests the datasource with their own Google account. With Default Dataset blank, the same limit applies to each dataset unless earlier probes have already confirmed all four table-level rights: updating table data, updating table definitions, deleting tables, and changing table IAM. If you hit the limit, set Default Dataset to a smaller dataset.

Choose one option under BigQuery Permissions.

  • Read only (preselected), https://www.googleapis.com/auth/bigquery.readonly. Ekaya serves only reads from BigQuery. This scope also limits an Administrator’s execute calls to reads.
  • Read and write, https://www.googleapis.com/auth/bigquery. Approved Requests can change rows under their cap on a ready sign-in. This scope also lets an Administrator use execute to change data under their own Google account. Google still enforces the account’s permissions.

Before you sign in as the Administrator who started setup, make sure your Google account has these BigQuery IAM permissions.

  • Run the connection test. The test starts by running SELECT 1 in the job project and reads no customer table. Your account needs bigquery.jobs.create on Job/Billing Project ID, or on Project ID if that field is blank. BigQuery Job User includes this permission. Google's query IAM requirements
  • Discover datasets and tables. Your account needs bigquery.datasets.get to look up the default dataset or see datasets when no default is set, bigquery.tables.list on each dataset in scope, and bigquery.tables.get on its listed tables. BigQuery IAM roles and permissions
  1. Choose Test Connection. The form reports “The connection is tested when Google sign-in completes.” and enables Save Datasource. Choose Save Datasource.
  2. As the Administrator who started setup, open the sign-in link in the datasource's connection panel. The Request Service page shows the exact redirect URI again. Enter the secret only in that page's OAuth client secret field, choose Sign in, and grant access with your Google account.
  3. Return to the connection panel so Ekaya can test and assess the connection using your grant. Once the datasource is ready, other Administrators can use Sign in for yourself.

Give each person the BigQuery permissions they need

  • Run query jobs. Give each person bigquery.jobs.create on the Job/Billing Project ID, for example with BigQuery Job User. If that field is blank, grant it on Project ID.
  • Read the data. Give each person bigquery.tables.getData for the tables they need.
  • Change data with Read and write. Give the person running an Action or an Administrator using execute the IAM permissions for that statement, such as bigquery.tables.updateData on the target table.

Administrator execute requires Execution on the datasource under either scope. To enable it, sign in to the ready datasource with your own Google account and edit it in Ekaya Admin. Choose Test Connection on the current fields. After a successful test, select Allow Execution through MCP on this datasource, then choose Update Datasource.

See BigQuery IAM roles and permissions.

The table IAM probe asks for bigquery.tables.getData. Setup can succeed without that permission. An Administrator can complete setup and still get an IAM denial when reading a particular table. For an empty dataset in scope, the assessment treats changes to table data or definitions, table deletion, and changes to table IAM as possible.

For every Google sign-in assessment, Ekaya treats table creation, dataset creation, and changes to project IAM as possible because it cannot check those permissions at project scope. That is why a successful test offers the Execution checkbox even if your account has read-only access. BigQuery still enforces the signed-in person's permissions on each Request.

If the initial assessment fails, the datasource stays in configuration. The connection panel says “The connection assessment failed.” and shows the reason. If SELECT 1 succeeds and the configured dataset lookup fails, the reason identifies that dataset. After fixing the IAM permissions, the same Administrator can choose Check again in the connection panel. Ekaya runs that Administrator's recheck at most once every 60 seconds.

When BigQuery IAM denies access while a signed-in person runs an Approved Request, the Data API returns HTTP 403. Over MCP, your AI receives a tool error. Both carry the code datasource_personal_access_denied and the message “BigQuery refused this person's access. Ask a project or dataset administrator to check their BigQuery permissions.”

Sign in, sign out, and leave a Project

If a Member runs an Approved Request before signing in to a datasource that requires personal sign-in, the Data API returns 409 user_sign_in_required. Members open Datasource sign-ins at /projects/<id>/sign-ins and choose Sign in for the datasource, or use the application's sign-in prompt when it offers one. The page lists a datasource only when personal sign-in is available and at least one of the Member's Roles grants access to an enabled Approved Request on it.

On Datasource sign-ins, choose Sign out by the datasource to withdraw your own grant. If all Approved Requests your Roles grant on that datasource are disabled, its row is absent and Sign out is unavailable there. When a Member is removed from the Project, Ekaya requests withdrawal of that Member's grant.

Run without a person and refresh the schema

Calls made as a Data Access Point or by your AI using its own agent identity need a separate BigQuery datasource configured with Service account key. When your AI acts through your signed-in MCP session, it uses your own Google sign-in for the datasource.

Scheduled schema refresh waits for an Administrator to refresh from Schema in Ekaya Admin while signed in to the datasource. PII scans and ontology measurements that need BigQuery remain paused even then. Ontology views and probes withhold unscanned column values, including samples and stored enum values. Direct SQL tools for Administrators follow their own access rules and the signed-in account's BigQuery permissions.