How to Configure Copilot Studio Bigquery Sandbox
You set up a copilot studio bigquery sandbox by linking an agent to Google Cloud. You must create a cloud project, set up a read-only role, and link the two apps. Most teams start by sharing a single cloud key across their whole workspace. This quick shortcut gives every user and prompt the exact same broad database permissions. If a role is too wide, an agent might read private rows or drop test tables. How a copilot studio bigquery sandbox works in practice First, your team creates a separa
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up a copilot studio bigquery sandbox by linking an agent to Google Cloud. You must create a cloud project, set up a read-only role, and link the two apps. Most teams start by sharing a single cloud key across their whole workspace. This quick shortcut gives every user and prompt the exact same broad database permissions. If a role is too wide, an agent might read private rows or drop test tables.
How a copilot studio bigquery sandbox works in practice
First, your team creates a separate test space in Google Cloud for safe data trials. This sandbox holds sample datasets so builders can test prompts without touching live customer records. Next, an admin creates a cloud identity that only has permission to run read queries. You should never give this role the power to change tables or delete rows. Once the cloud role is ready, you set up an external connector inside the agent workspace.
The agent takes a user question and turns that plain text into a database query. It then sends the query to the cloud data warehouse using the stored account key. The warehouse runs the job, pulls the matching rows, and sends them back to the chat. Builders can test how the bot handles big tables and tricky questions before going live. They can also check if the agent writes clean queries or wastes compute resources.
Good setup relies on strict separation between your test project and your production project. Your team should load fake or scrubbed rows into the test tables first. Even in a test space, people often copy real tables to save time during setup. That habit puts real emails, phone numbers, and card numbers inside a space meant for testing. Keeping roles tight at the start helps reduce the blast radius of a bad prompt.
What native cloud roles solve and what they miss
Native cloud roles do a great job of deciding which account can log in. They let you block an agent from seeing entire projects or specific datasets. You can also cap how much data a project scans each day to control costs. These basic rules stop outsiders from reaching your data warehouse without a valid key.
Still, static cloud roles cannot inspect what an individual query does while it runs. Once an agent logs in, the database trusts every command that fits the role. If a table holds one million rows, the agent can pull all of them at once. Native roles also cannot spot sensitive fields inside a table that the agent can read. If a test table contains real national IDs or emails, the query returns them in plain text. Dynamic masking rewrites matched fields in results, such as turning card numbers into stars.
BigQuery IAM + AI Sandbox Environments: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Shared service keys also make it hard to see which human triggered a specific query. In the cloud logs, every single request looks like it came from the same bot account. When a bad query slows down the warehouse, your team cannot trace the root user. You need a way to check queries in flight and tie actions to real people.
Why query-level controls matter for AI agents
AI agents do not behave like normal apps that run the same fixed queries every day. A human user can ask the bot a new question that builds a huge join. Without runtime checks, that single prompt can scan terabytes of data in seconds. Teams need controls that look at each statement before the database runs it. Checking every query lets you block risky commands and rewrite sensitive fields like phone numbers.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Can I use real customer data inside a test sandbox?
You should avoid putting real customer records into a test project whenever possible. If real data is present, use masking to rewrite emails, phone numbers, and card numbers in results.
What permissions should the agent account have?
Give the agent a read-only role scoped only to the specific test dataset it needs. Never grant admin rights or permissions that allow the bot to alter or drop tables.
How do we track which user ran a query through the bot?
Native service keys hide the human user because every query uses the same shared identity. You must capture user identity at the request level to log who triggered each database job.
Related guides
In this post