Beta Enterprise Agent identity is behind the
agent-identity feature flag. On Lightdash Cloud, ask Lightdash support to turn it on for your organization. On a self-hosted instance, enable the flag and set up the Snowflake agent integration. What Beta means.- Lightdash marks every agent query. The mark is on every warehouse and needs no setting. On Snowflake, the mark is in the query tag.
- Snowflake verifies agent sessions. Your organization can require each person to connect their agent through a separate Snowflake OAuth sign-in. Snowflake then knows that the session is an agent session. Your row access policies, masking policies, session policies and views can act on that.
REDACTED. Lightdash’s own controls still apply on top. See Data access control.
The verified agent session is available only for Snowflake. Connections to other warehouses get the query mark but are not affected by the organization rule.
Jump to organization setup, connecting your agent, Snowflake policies or verification.
Who sees what
A query tag alone does not prove that Snowflake verified the session. The agent session value and
agent_type do.
Before you start
- The Snowflake agent integration is set up for your instance. On Lightdash Cloud, Lightdash support sets it up. On a self-hosted instance, follow Agent identity on Snowflake.
- Your project uses the same Snowflake account as the integration. An instance has one agent integration for one Snowflake account. A project on a second Snowflake account cannot complete the agent connection.
- Each person has an allowed default role. Snowflake blocks the
ACCOUNTADMIN,SECURITYADMIN,ORGADMINandGLOBALORGADMINroles from OAuth sessions. The agent sign-in uses the person’s default role. Each person who uses agents needs a default role outside that list.
Require agent identity for your organization
Organization admins set one rule for the whole organization. It applies to every Snowflake connection in every project.1
Open Warehouse credentials
Go to Organization settings → Warehouse credentials and find the Agent identity card.
2
Turn on Require agent identity
Turn on Require agent identity. The switch saves the rule at once.
3
Check the notification
A success notification confirms the save.

CREATE SECURITY INTEGRATION statement for your instance instead.
While the rule is on:
- Every AI query on a Snowflake connection must run through the person’s agent connection. Lightdash refuses queries from people who have not connected.
- This covers chat, MCP, Slack and data app sample queries.
- Every Snowflake connection form shows “Agent identity required by your organisation”, with a link to the organization settings.

Connect your agent
Each person who uses agents connects their own agent once.1
Open My warehouse connections
Go to Settings → My warehouse connections and find the Agent connection section.
2
Select Connect agent
Select Connect agent. A Snowflake sign-in opens in a popup.
3
Approve the sign-in
Sign in to Snowflake and approve the request. Lightdash checks that Snowflake marks the session as an agent session before it saves the connection.

Before you connect
While the rule is on and a person has not connected their agent:- AI composers are hidden for Snowflake projects. This includes the Ask AI launcher, the homepage ask box and AI help in other parts of the app.
- The agent chat shows a Connect your agent to your warehouse card with a Connect agent button. It opens the same Snowflake sign-in.
- MCP and Slack refuse the query with: “Connect your agent to the warehouse once so it can run as you.”

Write Snowflake policies for agent sessions
Snowflake owns the data rules. Your policies decide what agent sessions may read. Each example readsSYS_CONTEXT('SNOWFLAKE$CURRENT', 'IS_AGENT_ACTIVATED'). The value is true only in a verified agent session.
Hide rows from agents
A row access policy can exclude sensitive rows from agent sessions:Mask values from agents
A masking policy can hide a value from agent sessions:Use a view on Snowflake Standard Edition
Row access and masking policies need Snowflake Enterprise Edition. On Standard Edition, a view gives the same result for the columns it covers:Limit what an agent session can do
A session policy can limit the privileges of an agent session:Verify the result
Run the same check in an agent session and in a normal session for the same person. For the agent session, ask an agent to run the SQL, for example in SQL mode or through the MCPrun_sql tool. For the normal session, run it in a Snowflake worksheet as that person.
agent_activated is true only in the agent session.
Then inspect recent query history with a role that can read account usage:
agent_type = 'EXTERNAL_AGENT' and the Lightdash agent mark in query_tag. QUERY_HISTORY has an ingestion delay, so new queries can take a while to appear. See QUERY_HISTORY.
Finally, query a protected table through an agent and as the person. Check that your row access, masking and session policies give the restrictions you expect.