How do I connect to Snowflake using SSO

We use SSO (AD based) to log into Snowflake. How do I connect Streamlit to my Snowflake instance in this situation?

Thanks

Hi @rwilsker, welcome to the Streamlit community!

Unfortunately, this is a question you’ll have to ask your Snowflake account rep. Streamlit doesn’t become part of Snowflake until the end of March, and we don’t have any Snowflake experts on staff (yet!)

Best,
Randy

2 Likes

Fair enough. Thank you for getting back to me.

1 Like

Hi. Can we please resurface this question?

My current Snowflake deployment uses Azure AD authentication. Would like to use Streamlit in this environment.,

Thanks.

1 Like

Hi @WilliamRaper,

Here’s the Snowflake doc page on how to use SSO with client applications, such as Streamlit, to connect to Snowflake:
https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#using-sso-with-client-applications-that-connect-to-snowflake

Unless you’re using Okta, which allows programmatic SSO, you will go with the Browser-based SSO option. For Paython, you basically need to specify authenticator="externalbrowser", as shown in the docs . I hope this helps.

I tried this solution before I posted this question. It did not work. The app never authenticated with Snowflake.

Can we please have someone post an example that was tested?

Bumping as I have the same issue, is there any update to this, I have attempted the authenticator : 'externalbrowser' solution to no avail in Streamlit. I should not that I have been successful in using this authentication in other python code examples.