Receiving a `Failed to connect to DB` error when connecting to Snowflake
-
If you see this error:
Failed to connect to DB: xxxxxxx.snowflakecomputing.com:443. The role requested in the connection, or the default role if none was requested in the connection ('xxxxx'), is not listed in the Access Token or was filtered.
Please specify another role, or contact your OAuth Authorization server administrator. -
Edit your OAuth Security integration and explicitly specify this scope mapping attribute:
ALTER INTEGRATION <my_int_name> SET EXTERNAL_OAUTH_SCOPE_MAPPING_ATTRIBUTE = 'scp';
You can read more about this error in Snowflake's documentation.
-
If you see this error:
Failed to connect to DB: xxxxxxx.snowflakecomputing.com:443. Incorrect username or password was specified. -
Double check that:
- There is not more than a single Snowflake user that shares the same email identifier. For example - there exist a human user that authenticates to Snowflake with the email
alice@acme.com
but at the same time there also exist a separate service account user that also authenticates withalice@acme.com
. - The email address of your user in Snowflake is identical to the email address you use to authenticate in your IdP. For example - if your Snowflake users email address is
alice@acme.com
but you authenticate in Entra/Okta withalice_adm@acme.com
- then those email addresses are not the same and you may see this error.
0