# Connect Treasure Data CDP

The Treasure Data connector lets Treasure AI Studio agents work with your Treasure Data CDP during a chat — running queries, building and inspecting audience segments, and managing workflows on your behalf. Unlike the Databricks and Snowflake connectors, there is no OAuth application to create on a vendor side: Treasure AI hosts the OAuth client for you. An administrator enables the connector once, and then each user authorizes their own connection with a Treasure Data sign-in.

New to connections?
Read [Connections](/products/ai-studio/connections) first for the general model — the difference between a connector and a connection, and the administrator vs. user roles. This page covers the Treasure Data-specific steps.

Migrating from built-in Treasure Data CDP access
Treasure Data CDP access in Studio has moved to the connector model on this page. If you connected to your CDP before this change, your previous authorization no longer applies — you need to authorize a connection once more. There's nothing to prepare in advance: the next time you ask the agent to use your CDP, it prompts you to connect right in the chat (see [Step 2](#step-2--authorize-your-connection-user)). The only prerequisite is that an administrator has enabled the Treasure Data connector for your account.

## Objective

Enable the Treasure Data connector for your account and authorize a connection so the agent can run queries, workflows, and segment operations against your Treasure Data CDP.

## Prerequisites

- Account administrator privileges in Treasure AI Studio (to enable the connector)
- A Treasure Data CDP account with access to the resources you want the agent to work with


## Step 1 — Enable the Treasure Data Connector (Administrator)

Because Treasure AI manages the OAuth client for Treasure Data CDP, there is nothing to register on the vendor side and no client ID or secret to enter. An administrator only needs to add the connector and enable it.

1. In Treasure AI Studio, open **Settings → Connector Settings** (under **Organization**).
2. Click **Add Connector** (or **Add your first connector**) and choose **Treasure Data**.
3. The Treasure Data connector has no configuration fields to fill in — click **Save** to add it.
4. Make sure the connector is **enabled** so users can authorize connections to it.


The Select Connector catalog in Connector Settings with the Treasure Data connector and an Add button, alongside the already-configured Databricks and Snowflake connectors
The Configure Treasure Data form in Connector Settings, showing only Save and Cancel buttons and no configuration fields
No OAuth setup on your side
The Databricks and Snowflake connectors require an administrator to create an OAuth application in the vendor's console and paste its client ID and secret. The Treasure Data connector skips all of that — the OAuth client is provided and managed by Treasure AI, so the configuration form is empty.

Allow the egress domains in your network policy
If your account uses a network policy, allow the connector's **egress domains** so the agent's sandbox can reach the Treasure Data CDP APIs. The required domains are shown next to the configured connector in **Connector Settings**.

## Step 2 — Authorize Your Connection (User)

Each user who wants the agent to access Treasure Data CDP authorizes their own connection. You can do this ahead of time from **Settings**, or on demand from a chat.

**From Settings:**

1. Open **Settings → Connections**.
2. Under **Available**, find **Treasure Data** and click **Connect**.
3. Sign in to Treasure Data in the popup and approve the requested access.
4. When the popup closes, **Treasure Data** appears in your connected list with the date you connected it.


The Connections page with Treasure Data listed under Available and a Connect button, alongside Databricks and Snowflake
To remove the connection later, click the delete (trash) icon next to it.

Connect from a chat instead
You don't have to authorize in advance. If you ask the agent to work with your CDP before you've connected, it shows a **Connection Required** card in the chat — click **Connect** there to run the same authorization without leaving the conversation. See [Connect from a chat](/products/ai-studio/connections#connect-from-a-chat).

The agent authorizes as you: it can access the same Treasure Data CDP resources that your own account can, and no more.

## Step 3 — Use Treasure Data CDP in a Chat

Once connected, ask the agent to work with your CDP — for example, to run a query, summarize a table, review an audience segment, or check a workflow. The agent uses the [tdx CLI](/products/ai-studio/query/tdx-commands) with your connection automatically; no extra configuration is needed in the chat. When the connection is active, the agent runs your request and returns the results inline without prompting you to connect again.

## Reference

| Item | Value |
|  --- | --- |
| Connector | Treasure Data |
| Authentication | OAuth 2.0 (user-to-machine), platform-managed client with PKCE |
| OAuth scopes | `openid`, `email`, `profile` |
| Agent identity | Acts as the authorizing user, with that user's Treasure Data CDP permissions |
| Required configuration | None — the OAuth client is managed by Treasure AI; an administrator only enables the connector |
| Egress domains | Managed by Treasure AI (region-specific); shown next to the configured connector in **Connector Settings** |


## Troubleshooting

| Issue | Solution |
|  --- | --- |
| Treasure Data isn't listed on the Connections tab | An administrator must add the Treasure Data connector in **Connector Settings** and enable it. |
| Treasure Data CDP stopped working after the connector migration | Your previous built-in authorization no longer applies. Reconnect from **Settings → Connections**, or accept the **Connection Required** card the next time the agent needs your CDP. |
| The connection authorizes but the agent can't reach Treasure Data CDP | Allow the connector's egress domains in your network policy (see the domains shown in **Connector Settings**). |
| The agent can't see a database or table you expect | The agent acts with your Treasure Data CDP permissions. Confirm your own account can access that resource in Treasure Data CDP. |


## Next Steps

- [Connections](/products/ai-studio/connections) — The general connection model and administrator controls
- [TDX Commands](/products/ai-studio/query/tdx-commands) — How the agent works with your CDP from the command line
- [Query Execution](/products/ai-studio/query/query-execution) — How the agent runs and returns query results
- [Connect Snowflake](/products/ai-studio/connections/snowflake) — Configure and authorize a Snowflake connection