I have a container which needs to connect to snowflake using SSO. I have already seen the thread here; however it seems the solution there is causing me another error.
When the authenticator is set to ‘externalbrowser’, the below message is returned:
to authenticate…
We were unable to open a browser window for you, please open the url above manually then paste the URL you are redirected to into the terminal.
Enter the URL the SSO URL redirected you to:
Once I copy the URL in my local browser, the URL is changed to my local host, something like as follows:
http://localhost:39523/?token=vVhpk6JMEv4rHc5Hw-ZUwbCN5fCgFRRv_bLBUSA3UgWIv34LnW_KajPtDm-
When I copy the returned URL in the terminal, this error is thrown:
Encountered an error:
Runtime Error
Database error while listing schemas in database "TEST"
Database Error
250001 (08001): Failed to connect to DB: xxxx.xxx-europe.azure.snowflakecomputing.com:port. The user you were trying to authenticate as differs from the user currently logged in at the IDP.
Can someone help me with this or any other workarounds that are possible with SSO please?
2
Answers
You can look at the OAuth as an alternative in this case provided there is connectivity from the container to the Azure AD server.
https://docs.snowflake.com/en/user-guide/oauth-azure
Key pair authentication may be a better option for a Docker solution. https://docs.snowflake.com/en/user-guide/key-pair-auth