How to Configure Copilot Studio Snowflake Prevent Delete
To set up a copilot studio snowflake prevent delete workflow, assign a dedicated role without delete rights. Your AI bot then uses this restricted role to read or add rows while the warehouse blocks row removal. Teams often start by reusing a broad admin or developer role during testing. When a bot uses broad permissions in production, one bad prompt can wipe out whole tables. How to set up a copilot studio snowflake prevent delete role Setting up safe warehouse permissions starts inside your
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.
To set up a copilot studio snowflake prevent delete workflow, assign a dedicated role without delete rights. Your AI bot then uses this restricted role to read or add rows while the warehouse blocks row removal. Teams often start by reusing a broad admin or developer role during testing. When a bot uses broad permissions in production, one bad prompt can wipe out whole tables.
How to set up a copilot studio snowflake prevent delete role
Setting up safe warehouse permissions starts inside your cloud data platform. Data teams create a custom role built just for the AI bot. You grant this role usage rights on the permissions warehouse, database, and schema. Next, you grant select, insert, and update privileges on the specific tables the bot needs. You leave out the delete, truncate, and drop privileges on those tables.
After the role is ready, you assign it to the service user for your bot. In your bot builder, you configure the warehouse action to log in with that specific user and role. Every time a user asks the bot a question, the bot opens a warehouse session under that role. If the bot tries to run a delete statement, the warehouse engine checks the role grants and rejects the query.
What native role checks solve and what they miss
Native warehouse roles are great for coarse, table-level boundaries. They stop an AI agent from dropping tables or running delete commands across a schema. They also keep permissions in one place inside your warehouse engine. For simple read-only bots, a basic select-only role is often enough to keep data safe.
Still, static database roles only decide who can log in and which command types they can run. A role cannot inspect what an individual statement does in flight when a bot needs write rights. For example, a role that allows updates but blocks deletes still allows a bad update query. An agent could overwrite every row in a table with blank values if it forgets a filter clause.
Static roles also do not solve sensitive data exposure in query results. When a bot reads a customer table, the role returns full rows to the agent context. Unless you build views for every table, raw emails, phone numbers, card numbers, and national IDs flow back to the bot. Teams often end up managing dozens of custom roles and views just to keep bots safe.
Snowflake Access Control + Copilot Security Implications: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why query-level controls matter for AI agents
AI bots generate queries on the fly based on user prompts. Because user prompts are hard to predict, static role grants are only the first step. Teams also need a way to check individual statements before they hit the data warehouse. Inspecting queries in flight lets you block risky updates or require human approval for big changes.
In-flight controls also help teams protect private records without writing new database views. Dynamic data masking rewrites matched fields like emails and card numbers in query results before the bot processes them. Pairing least-privilege warehouse roles with statement-level checks gives teams a much safer way to run AI agents.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
How do I stop my AI bot from deleting warehouse rows?
Create a dedicated database role for the bot and grant only select, insert, or update rights. Do not grant delete, truncate, or drop permissions to the role the bot uses.
Can a bot still ruin data without delete permissions?
Yes, if the bot has update permissions, it can still overwrite existing records. A missing filter clause in an update query can wipe out values across an entire table.
How can I protect private data when the bot runs select queries?
You can restrict the bot to safe views or apply dynamic data masking. Masking rewrites matched fields like emails, phone numbers, and card numbers in the query results.
Related guides
In this post