Grant create user permission Snowflake

777 Views Asked by At

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.

1

There are 1 best solutions below

0
sprethepa On BEST ANSWER

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;