1

Its a newbie question but still I am trying to grant create user permission to sysadmin role from the accountAdmin role so that I can create users in the sysadmin role.

The statement I am trying to execute is:

grant create user to role sysadmin;

Error

SQL compilation error: syntax error line 1 at position 18 unexpected 'to'.

What's the exact statement to achieve this? I tried googling but haven't found any exact query statement in a long time, so posting it here.

Mukul Kumar
  • 564
  • 1
  • 5
  • 24

1 Answers1

2

Grant create user on account to role role_name ;

Please note that this statement has to be submitted as an ACCOUNTADMIN

https://docs.snowflake.com/en/sql-reference/sql/grant-privilege.html

You could also choose to use the WITH GRANT OPTION which allows the grantee to regrant the role to other users.

Grant create user on account to role role_name WITH GRANT OPTION;

sprethepa
  • 544
  • 2
  • 4