Accounts and Security · Topic 4 of 17
System Roles, Functional and Access Roles, and Secondary Roles
Know the Snowflake system roles and best practices, how functional roles differ from access roles, and how secondary roles combine privileges.
- 5 min
- Includes a diagram
USERADMINmanages users and roles;SECURITYADMINmanages grants and inheritsUSERADMIN;SYSADMINowns objects;ACCOUNTADMINsits above both.ORGADMINis the organization level role for accounts and organization usage.- Best practice: few
ACCOUNTADMINusers with MFA, never default, no objects created with it; custom roles roll up toSYSADMIN.
What it is
Every account starts with a fixed set of system roles, and a good design adds custom roles on top. The recommended pattern splits custom roles into two kinds: access roles that carry object privileges, and functional roles that represent what a person does. Secondary roles then let a user combine several functional roles in one session.
The exam asks which system role performs which task, why ACCOUNTADMIN must be used sparingly, and how a custom role tree should be shaped.
How it works
System roles

| Role | Purpose |
|---|---|
ORGADMIN | Manages the organization: creates accounts, views organization usage |
ACCOUNTADMIN | Top account role; inherits SYSADMIN and SECURITYADMIN; sees billing and manages account level settings |
SECURITYADMIN | Holds MANAGE GRANTS; creates and manages roles and grants; inherits USERADMIN |
USERADMIN | Creates and manages users and roles (CREATE USER, CREATE ROLE) |
SYSADMIN | Creates warehouses, databases and other objects; the root of the custom role tree |
PUBLIC | Granted to every user and role automatically; objects owned by it are available to all |
Best practices for system roles
- Use
ACCOUNTADMINonly for tasks that need it, and never as a daily or default role. - Assign it to a small number of people (at least two, so one absence does not lock you out), protect them with MFA, and give each a valid email address.
- Do not create objects with
ACCOUNTADMINorSECURITYADMIN; a database owned byACCOUNTADMINis hard to delegate. - Create custom roles with
USERADMIN(orSECURITYADMIN) and make every custom role a descendant ofSYSADMIN, so administrators can manage the objects. - Give
SYSADMINownership of databases and warehouses, then delegate through grants rather than throughACCOUNTADMIN. - Keep privileges off
PUBLICunless every user really needs them.
If a custom role is not granted up to SYSADMIN, its objects are invisible to SYSADMIN and the administrators lose control over them.
Functional roles compared to access roles
The recommended design separates what can be touched from who does the work.
| Aspect | Access role | Functional role |
|---|---|---|
| Represents | A set of privileges on objects | A job function or team |
| Example | SALES_RO, SALES_RW, FINANCE_RO | ANALYST, DATA_ENGINEER, MARKETING_LEAD |
| Holds | Object privileges | Other roles (mostly access roles) |
| Granted to | Functional roles | Users |
| Changed when | Objects or permissions change | People change jobs |
CREATE ROLE sales_ro;
CREATE ROLE finance_ro;
CREATE ROLE analyst;
GRANT SELECT ON ALL TABLES IN SCHEMA sales.public TO ROLE sales_ro;
GRANT ROLE sales_ro TO ROLE analyst;
GRANT ROLE finance_ro TO ROLE analyst;
GRANT ROLE analyst TO USER ana;
Adding a table changes one access role. Moving a person to a different team changes one user grant. Neither change touches the other layer, which is the reason for the split. Database roles serve well as access roles, because they stay with the database and can go into a share.
Secondary roles
A session has one primary role and may have secondary roles. Privileges from the primary role and all active secondary roles are combined to authorize most actions, so a user does not have to switch roles to join data from two domains.
USE ROLE analyst;
USE SECONDARY ROLES ALL;
ALTER USER ana SET DEFAULT_SECONDARY_ROLES = ('ALL');
USE SECONDARY ROLES ALLactivates every role granted to the user;NONEturns them off.- The user property
DEFAULT_SECONDARY_ROLESsets what is active at login. - Creating objects is authorized by the primary role only, and the primary role owns the new object.
- Policy functions differ:
CURRENT_ROLE()returns only the primary role, whileIS_ROLE_IN_SESSION('ROLE')is true if the role is the primary role, a secondary role, or inherited by either.
When a masking or row access policy must still work for users who combine roles, write it with IS_ROLE_IN_SESSION, not CURRENT_ROLE. Otherwise a user with the right secondary role is treated as unauthorized.
Common mistakes
Working as ACCOUNTADMIN all the time. One wrong command then runs with the most powerful role. Switch to it only for the task.
Leaving custom roles outside the SYSADMIN tree. Administrators then cannot see or manage the objects.
Granting object privileges straight to functional roles. Each team change turns into many grants. Use access roles in between.
Using CURRENT_ROLE() in policies. Secondary roles are ignored, so policies behave unexpectedly for combined sessions.
What to remember for the exam
USERADMINmanages users and roles;SECURITYADMINmanages grants and inheritsUSERADMIN;SYSADMINowns objects;ACCOUNTADMINsits above both.ORGADMINis the organization level role for accounts and organization usage.- Best practice: few
ACCOUNTADMINusers with MFA, never default, no objects created with it; custom roles roll up toSYSADMIN. - Access roles hold object privileges; functional roles map to jobs and are granted to users.
- Secondary roles combine privileges, but only the primary role creates and owns objects.
IS_ROLE_IN_SESSIONsees secondary and inherited roles;CURRENT_ROLEdoes not.
Check yourself
Which system role should own databases and warehouses?
SYSADMIN, with custom roles granted to it so that the whole tree is manageable.Why separate access roles from functional roles?
Object changes affect only access roles and job changes affect only user grants, so each change stays small.
A user has secondary roles active and creates a table. Who owns it?
The primary role, because object creation is authorized and owned by the primary role only.
Topic 4 of 17 in Accounts and Security
Test yourself on Accounts and Security
The full Snowflake ARA-C01 question bank has 687 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.