# Step 3: Configure BigQuery Authentication in Integration Hub

The BigQuery authentication configuration establishes the connection between Treasure AI and your BigQuery project. Composable Audience Studio supports **JSON keyfile** and **Workload Identity Federation (WIF)** authentication. WIF uses short-lived credentials without requiring a service account JSON key.

For WIF, complete the [WIF preparation in Step 2](/ja/products/customer-data-platform/composable-cdp/audience-studio/bigquery/set-up-bigquery-authentication) before saving the authentication. That preparation explains how to obtain Treasure AI's AWS account ID from the authentication form and complete the GCP setup. Use the [BigQuery IAM permissions required for CAS](/ja/products/customer-data-platform/composable-cdp/audience-studio/bigquery/prepare-bigquery-data#bigquery-iam-permissions) instead of the import-specific roles in the shared WIF guide.

## Steps

If you left the WIF authentication form open in Step 2, resume at step 3 below and fill in the connection details.

1. In the Treasure AI console, navigate to **Integration Hub** > **Authentications**.
2. Search for **Google BigQuery** and select it.
3. Click **New Authentication** and fill in the connection details:


| Parameter | Description | Example |
|  --- | --- | --- |
| Name | A descriptive name for this connection | `bigquery-cas-connection` |
| Authentication Method | Select **JSON keyfile** or **Workload Identity Federation** | `Workload Identity Federation` |
| JSON Keyfile | For **JSON keyfile** authentication, paste the full contents of the service account JSON key file from [Step 2](/ja/products/customer-data-platform/composable-cdp/audience-studio/bigquery/set-up-bigquery-authentication#gcp-step-3-generate-a-json-key) | `{ "type": "service_account", ... }` |
| ADC Keyfile | For **Workload Identity Federation** authentication, paste the full contents of the downloaded `external_account` JSON configuration | `{ "type": "external_account", ... }` |


Note
OAuth user credentials are not supported for CDW connections used in CAS. Select **JSON keyfile** or **Workload Identity Federation**.

1. Click **Continue** and complete the setup.
2. Save the configuration.


## Record the Connection ID

After saving, the authentication is assigned a `connectionId`. You can find it in the URL of the authentication detail page (e.g., `console.<region>.treasuredata.com/app/integrations/authentications/bigquery/123456` — the `connectionId` is `123456`). You will need this ID in the next step.

You can also retrieve it via the CLI:

```shell
tdx connection show "bigquery-cas-connection"
# Look for the "id" field in the output
```