Skip to content

Connect Treasure Data CDP

WebDesktop

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. Treasure AI manages the OAuth client, so there is no OAuth application to create. An administrator adds the connector and can specify policies to limit what agents can access through it. Each user then authorizes their own connection with a Treasure AI sign-in.

New to connections?

Read 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). The only prerequisite is that an administrator has added the Treasure Data connector for your account.

Objective

Add the Treasure Data connector for your account, optionally restrict its access with policies, 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 add the connector)
  • A Treasure Data CDP account with access to the resources you want the agent to work with
  • Optional: JSON exported from Treasure Console for the policies you want agents to use. See Exporting Policies for Treasure AI Studio.

Step 1 — Add the Treasure Data Connector (Administrator)

Treasure AI manages the OAuth client for Treasure Data CDP, so there is no client ID or secret to enter. To restrict the connector's access, export the policies you want agents to use from Treasure Console and paste the resulting JSON when you add the connector.

  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. Optional: in Policy export document, paste the JSON you copied from Treasure Console. Leave the field empty to keep the agent's access the same as each user's own permissions.
  4. If you pasted JSON, check that Site and Account in the preview match your Treasure Data CDP account. The preview appears once the text is valid JSON.
  5. Click Save. The Treasure Data connector appears in Connector Settings.
  6. Make sure the connector is enabled so users can authorize connections to it.
Configure Treasure Data screen with the Policy export document field for pasting JSON exported from Treasure Console, and Save and Cancel buttons

Connector Policies and User Permissions

The policies specified for the connector limit every user's access through that connector. When a user authorizes a connection, Treasure AI creates a sub user with only the policies that are both specified for the connector and assigned to that user. This can narrow the agent's access but can't grant permissions the user doesn't have. The set of policies assigned to the connection is determined during authorization.

After you save the connector, expand the Treasure Data row in Connector Settings to see Pinned Policies. It lists the policy IDs specified for the connector, and View document shows the saved JSON.

Changing the Connector's Policies

You can't edit the policies specified for an existing connector. To use different policies, export the new selection from Treasure Console, delete the Treasure Data connector, and add it again with the new JSON. To remove the restriction, leave the field empty when you add the connector again. Deleting the connector removes every member's Treasure Data connection, so each member must authorize again. On free accounts, the Treasure Data connector can't be deleted, so its policy selection can't be changed.

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 AI 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 other connectors

If an administrator specified policies for the connector, the page that appears after you sign in lists the Assigned policies granted to your connection. The page also warns you when none or only some of the specified policies were granted to your user.

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.

Without connector-level restrictions, the agent can access the same Treasure Data CDP resources that you can. If the connector has policies specified, the agent can use only those policies that are also assigned to you.


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 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.

In Ask mode, the default, the agent normally shows the exact command on a question card before each tdx command and waits for your approval. It can occasionally run one without asking. In Auto, it runs tdx commands without asking, so restrict anything that must not happen with your Treasure Data CDP permissions rather than relying on the card. See Approval Before tdx Commands.


Reference

Item Value
ConnectorTreasure Data
AuthenticationOAuth 2.0 (user-to-machine), platform-managed client with PKCE
OAuth scopesopenid, email, profile
Agent permissionsUses the authorizing user's Treasure Data CDP permissions. If policies are specified for the connector, uses only those policies that are also assigned to that user
Required configurationNone — the OAuth client is managed by Treasure AI
Connector access restrictionsOptional. Specify policies by pasting the JSON exported from Treasure Console into Policy export document. Changing the policy selection requires deleting and adding the connector again
Egress domainsManaged 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 tabAn administrator must add the Treasure Data connector in Connector Settings and enable it.
Treasure Data CDP stopped working after the connector migrationYour 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 CDPAllow 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 expectConfirm you can access that resource in Treasure Data CDP. If policies are specified for the connector, the agent is also limited to those policies. Check the policy IDs under Pinned Policies.
The pasted JSON is rejected with "not valid JSON"Paste the JSON exactly as exported from Treasure Console. Don't edit it.
Connecting fails because the JSON was exported from a different account or environmentDelete the connector and add it again with JSON exported from the Treasure Data CDP account and environment used by this Treasure AI Studio account.
Connecting fails with "The parent user has reached the limit of 20 sub users"Treasure AI allows 20 sub users per user. In Treasure Console, open My Settings → Sub Users, revoke the sub users you no longer use, and then connect again.
A connection shows Needs recreation in Settings → ConnectionsTreasure AI no longer accepts this connection. Delete it and connect again.
The connection page says it has no accessNone of the policies specified for the connector are assigned to your user. Ask an administrator to grant you the policies you need. After the assignments are corrected, delete your Treasure Data connection from Settings → Connections and connect again. Don't delete the organization-wide connector.
The connection page says some policies were not grantedSome policies specified for the connector aren't assigned to your user. Ask an administrator to check the policies and your assignments in Treasure Console. After the assignments are corrected, delete your Treasure Data connection from Settings → Connections and connect again. Don't delete the organization-wide connector.

To review your sub users and revoke any you no longer use, open My Settings → Sub Users in Treasure Console.

Treasure Console Settings with Sub Users selected and an example Treasure AI Studio entry in the list

Next Steps