A Snowflake account is configured with SCIM provisioning for user accounts and has bi-directional synchronization for user identities. An Administrator with access to SECURITYADMIN uses the Snowflake UI to create a user by issuing the following commands:
use role USERADMIN;
create or replace role DEVELOPER_ROLE;
create user PTORRES PASSWORD = 'hello world!' MUST_CHANGE_PASSWORD = FALSE
default_role = DEVELOPER_ROLE;
The new user named PTORRES successfully logs in, but sees a default role of PUBLIC in the web UI. When attempted, the following command fails:
use DEVELOPER_ROLE;
Why does this command fail?
According to the Snowflake documentation1, creating a user with a default role does not automatically grant that role to the user. The user must be explicitly granted the role by the role owner or a higher-level role. Therefore, the USERADMIN role, which created the DEVELOPER_ROLE, needs to explicitly grant the DEVELOPER_ROLE to the new user PTORRES using the GRANT ROLE command. Otherwise, the user PTORRES will not be able to use the DEVELOPER_ROLE and will see the default role of PUBLIC in the web UI. Option A is incorrect because the DEVELOPER_ROLE does not need to be granted to SYSADMIN before user PTORRES can use the role. Option B is incorrect because the new role can take effect immediately after it is created and granted to the user, and does not depend on the USERADMIN role logging out. Option D is incorrect because the new role will not be affected by the identity provider synchronization, as it is created and managed in Snowflake.
Ressie
1 month agoVincent
2 months agoBulah
2 months agoShonda
2 months agoAlexis
2 months agoRosenda
2 months agoGene
2 months agoAlana
3 months agoGlynda
3 months agoReid
3 months agoJulio
4 months agoMargo
4 months agoAmalia
4 months agoSocorro
4 months agoBillye
4 months agoPercy
4 months agoRoxane
5 months agoLera
5 months agoKayleigh
5 months agoTammara
5 months agoAmmie
6 months agoGary
6 months agoCordie
6 months agoEstrella
6 months agoJose
6 months agoSommer
23 days agoKimbery
28 days agoTerrilyn
1 month agoPeggie
1 month agoGlory
5 months ago