CertSafari
    Snowflake SnowPro Specialty: Gen AI (GES-C02)· Lessons

    Domain 3 · Lesson 9/15

    Privileges for Cortex Analyst, Agents, Search and Snowflake Intelligence

    Grant and revoke Role-Based Access Control (RBAC) and privileges.

    9 min read
    7.25% of exam
    4 sources
    Published 21 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Grant CORTEX_ANALYST_USER and the semantic-model privileges Cortex Analyst needs
    • Assemble the full grant set for a user calling a Cortex Agent, including its tools
    • Separate the privileges to create, query and operate a Cortex Search service
    • Control who can create and see the Snowflake Intelligence agent list

    1.Cortex Analyst: CORTEX_ANALYST_USER plus the semantic model

    Cortex Analyst turns a business question into SQL over a semantic model, so access has two layers. A database role lets the user call the service at all, and ordinary object privileges control what data Analyst can reach on that user's behalf. The default PUBLIC grant of CORTEX_USER means every user starts with Analyst access, and each Cortex service also offers a narrower database role to replace it.

    For Cortex Analyst, the narrower role is SNOWFLAKE.CORTEX_ANALYST_USER, which grants access to Analyst and nothing else. It only restricts users if they don't also hold CORTEX_USER. If an analyst role keeps CORTEX_USER, granting it CORTEX_ANALYST_USER takes nothing away, so ACCOUNTADMIN must also run REVOKE DATABASE ROLE SNOWFLAKE.CORTEX_USER FROM ROLE analyst;. Database roles cannot be granted to users directly, so the Analyst role goes to a custom account role as well.

    Selective Cortex Analyst access through a custom rolesql
    USE ROLE ACCOUNTADMIN;
    CREATE ROLE cortex_analyst_user_role;
    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_ANALYST_USER TO ROLE cortex_analyst_user_role;
    
    GRANT ROLE cortex_analyst_user_role TO USER example_user;

    The database role only opens the API. Answering a question also needs privileges on what the semantic model refers to. To limit who can use a particular semantic model kept as a YAML file, store the file on a stage and control access to that stage. Semantic views are the recommended form for new work. They carry Snowflake's normal RBAC and privilege management.

    Object privileges Cortex Analyst needs alongside its database role
    PrivilegeObject
    READ or WRITEStage that contains the semantic model YAML file, if the model is on a stage
    USAGEThe Cortex Search services mentioned in the semantic model
    SELECTThe tables mentioned in the semantic model

    Checkpoint 1 of 5· Fill the gap

    Analysts should be able to use Cortex Analyst but no other Covered AI Feature. Which database role completes this setup?

    USE ROLE ACCOUNTADMIN;
    CREATE ROLE cortex_analyst_user_role;
    GRANT DATABASE ROLE SNOWFLAKE. ?  TO ROLE cortex_analyst_user_role;
    
    GRANT ROLE cortex_analyst_user_role TO USER example_user;

    Checkpoint 2 of 5· Check yourself

    Role sales_rl holds SNOWFLAKE.CORTEX_ANALYST_USER. Its users ask questions against a legacy semantic model YAML file kept on a stage, and that file refers to several tables. What other access does sales_rl need for Cortex Analyst to answer?

    Sources1

    2.Cortex Agents: the agent object and its tools

    Calling the Cortex Agents agent:run API requires CORTEX_USER or SNOWFLAKE.CORTEX_AGENT_USER, which grants Cortex Agents only. As with Analyst, a role that keeps CORTEX_USER keeps access to every Covered AI Feature, so restricting a role to agents means revoking CORTEX_USER from it. The role that authorizes a request is the one selected in Snowsight, or the one named in the X-Snowflake-Role header for REST calls. If neither is set, Snowflake uses the user's default role, and any active secondary roles take part in the privilege checks.

    The agent is a schema object with its own privileges. CREATE AGENT on the schema lets a role create agents. USAGE on the agent lets a role query it. MODIFY lets a role update the agent or drop it, MONITOR lets it view threads, logs and traces, and OWNERSHIP goes to the creating role. Every caller needs USAGE on the agent, on its database and schema, and on the warehouses configured for its tools.

    Minimum grants for a role that calls an agentsql
    GRANT USAGE ON DATABASE <database_name> TO ROLE <role_name>;
    GRANT USAGE ON SCHEMA <database_name>.<schema_name> TO ROLE <role_name>;
    GRANT USAGE ON AGENT <database_name>.<schema_name>.<agent_name> TO ROLE <role_name>;
    GRANT USAGE ON WAREHOUSE <warehouse_name> TO ROLE <role_name>;

    USAGE on the agent is not enough on its own, because the agent runs its tools with the caller's session roles. The caller also needs USAGE on each Cortex Search service the agent uses, USAGE on the database, schema and tables behind its semantic view, and USAGE on any function or stored procedure that serves as a custom tool. If one of these is missing, the default accept mode drops that tool quietly, and the user gets a thinner answer, not an error. Set orchestration.tool_not_accessible to reject if a missing privilege should fail the run instead. The apps users build on top of these grants are covered in chat-with-data interfaces.

    Checkpoint 3 of 5· Check yourself

    A support team's agent uses a Cortex Search service as a tool. Their role, support_rl, has USAGE on the agent, its database, its schema and the tool warehouse. They get thin answers with no error, and the search tool shows up as a warning. Which change lets the agent use the search tool for them?

    Sources2

    Creating, querying and operating a Cortex Search service are controlled by separate privileges, and one role need not hold all three. The creator role needs the embedding functions, through CORTEX_USER or CORTEX_EMBED_USER, plus CREATE CORTEX SEARCH SERVICE or OWNERSHIP on the target schema, SELECT on the source tables or views, and USAGE on the warehouse that refreshes the service. Holding the roles is not sufficient, though. Creation also requires change tracking on every underlying object.

    Querying needs much less. A consumer role needs USAGE on the service and on its database and schema, and no CREATE privilege or table SELECT. Suspending or resuming the service with ALTER CORTEX SEARCH SERVICE takes a third privilege, OPERATE on the service. A support team can query a service while a platform team operates it.

    Letting another role query an existing search servicesql
    GRANT USAGE ON DATABASE cortex_search_db TO ROLE customer_support;
    GRANT USAGE ON SCHEMA services TO ROLE customer_support;
    
    GRANT USAGE ON CORTEX SEARCH SERVICE transcript_search_service TO ROLE customer_support;

    Checkpoint 4 of 5· Fill the gap

    The customer_support role must be able to query an existing Cortex Search service, but must not suspend, resume or rebuild it. Which privilege on the service completes this grant set?

    GRANT USAGE ON DATABASE cortex_search_db TO ROLE customer_support;
    GRANT USAGE ON SCHEMA services TO ROLE customer_support;
    
    GRANT  ?  ON CORTEX SEARCH SERVICE transcript_search_service TO ROLE customer_support;

    Sources3

    4.Snowflake Intelligence: the account-level agent list

    Snowflake Intelligence shows users a curated list of agents, and that list is a real account-level object. The documentation now labels the interface Snowflake CoWork, but the SQL object type is still SNOWFLAKE INTELLIGENCE. Creating it requires the CREATE SNOWFLAKE INTELLIGENCE account privilege. ACCOUNTADMIN holds that privilege by default and can pass it on with GRANT CREATE SNOWFLAKE INTELLIGENCE ON ACCOUNT TO ROLE <role_name>;. If an administrator changes the settings in Snowsight before the object exists, Snowflake creates it automatically, named SNOWFLAKE_INTELLIGENCE_OBJECT_DEFAULT.

    Users need USAGE on the Snowflake Intelligence object to see its list of agents. To query a listed agent, they need the agent grants from the Cortex Agents section: USAGE on the agent and its database and schema, USAGE on its Search services, SELECT on tables and USAGE on the semantic view, and USAGE on custom tools. If citations point to source documents on a stage, users also need READ on that stage.

    For the database role, Snowflake Intelligence users need CORTEX_AGENT_USER after CORTEX_USER has been revoked from PUBLIC. That role covers only the Cortex Agents API, which is enough to use the interface but nothing else in Cortex.

    Checkpoint 5 of 5· Check yourself

    Store managers should reach Cortex only through Snowflake Intelligence and must not call AI functions or use other Cortex features directly. Their role, store_mgr_rl, already has every agent and tool privilege it needs. In this account, PUBLIC still holds the default database role. Which database-role setup meets the goal?

    Sources4

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “CORTEX_USER provides access to all Covered AI features, while CORTEX_ANALYST_USER provides access only to Cortex Analyst.”
      ↩︎ Cortex Analyst: CORTEX_ANALYST_USER plus the semantic model
      “If your user roles have the CORTEX_USER role, you must revoke access to the CORTEX_USER role.”
      ↩︎ Cortex Analyst: CORTEX_ANALYST_USER plus the semantic model
      “To control access to specific semantic models, you can store the YAML file in a stage and control access to that stage.”
      ↩︎ Cortex Analyst: CORTEX_ANALYST_USER plus the semantic model
      “If your user roles have the CORTEX_USER role, you must revoke access to the CORTEX_USER role.”
      ↩︎ Exam trap 1
      “READ or WRITE | Stage that contains the semantic model YAML file, if the semantic model is uploaded to a stage.”
      ↩︎ Checkpoint
    2. 2.
      “SNOWFLAKE.CORTEX_AGENT_USER: Grants access to Cortex Agents only.”
      ↩︎ Cortex Agents: the agent object and its tools
      “A role that also has the CORTEX_USER database role retains access to all Covered AI Features.”
      ↩︎ Cortex Agents: the agent object and its tools
      “At a minimum, the active role must be granted USAGE on the agent and on the database and schema that contain it.”
      ↩︎ Cortex Agents: the agent object and its tools
      “The agent continues with the tools the role can access and reports the rest as warnings.”
      ↩︎ Cortex Agents: the agent object and its tools
      “At a minimum, the active role must be granted USAGE on the agent and on the database and schema that contain it.”
      ↩︎ Exam trap 2
      “A role that is active in the caller’s session also needs privileges on each tool you expect the agent to use.”
      ↩︎ Checkpoint
    3. 3.
      “requires granting the SNOWFLAKE.CORTEX_USER database role or the SNOWFLAKE.CORTEX_EMBED_USER database role to the service creator role”
      ↩︎ Cortex Search: create, query and operate
      “The CREATE CORTEX SEARCH SERVICE or OWNERSHIP privilege on the schema where you create the service.”
      ↩︎ Cortex Search: create, query and operate
      “must have USAGE privileges on the service itself, as well as on the database and schema”
      ↩︎ Cortex Search: create, query and operate
      “the role of the querying user must have the OPERATE privilege on the service”
      ↩︎ Cortex Search: create, query and operate
      “Change tracking must be enabled on all underlying objects used by a Cortex Search Service.”
      ↩︎ Exam trap 3
    4. 4.
      “The Snowflake CoWork object is an account-level object that contains a list of agents.”
      ↩︎ Snowflake Intelligence: the account-level agent list
      “This privilege is granted to ACCOUNTADMIN by default.”
      ↩︎ Snowflake Intelligence: the account-level agent list
      “When created using the UI, the Snowflake CoWork object is named SNOWFLAKE_INTELLIGENCE_OBJECT_DEFAULT.”
      ↩︎ Snowflake Intelligence: the account-level agent list
      “Privilege that allows users to view the list of agents added to the Snowflake CoWork object”
      ↩︎ Snowflake Intelligence: the account-level agent list
      “This role gives users access to only the Cortex Agents API, which allows them to use Snowflake CoWork, but not the other Cortex features.”
      ↩︎ Snowflake Intelligence: the account-level agent list
      “After the CORTEX_USER role is revoked from the PUBLIC role, you can grant the CORTEX_AGENT_USER role.”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.