# Connecting to snowflake via SSO

**URL:** <https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228>\
**Category:** Help\
**Created:** [February 28, 2024, 2:21am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228 "2024-02-28T02:21:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![denised](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/denised/32/3460_2.png) [@denised](https://discourse.getdbt.com/u/denised)\
**Post date:** [February 28, 2024, 2:21am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/1 "2024-02-28T02:21:25Z")

</div>

We’re trying to convert all of our Snowflake accounts to use SSO, and so we’re figuring out how to set that up for dbt.

I did the obvious thing of replacing the password configuration in `profile.yml` with

```auto
   ...
   authenticator: externalbrowser
   ...

```

When I try to run dbt with this configuration, it does bring up a browser window, but as soon as I have authenticated there, it immediately brings up another. I can keep authenticating, but the same thing keeps happening…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/2X/f/f8cd11adbdbe0d6f0375476b7ff4ffc09f4f9c63.png)

I’m using the lastest version of dbt-snowflake available via pip, which gives me dbt-core=1.75 and the snowflake plugin=1.72. I’m running this under git bash on Windows, but I saw essentially the same behavior running in a linux docker image, so I’m guessing it is not an OS issue.

The only issues I’ve seen referenced are pretty old ([Intermittent problem with DB connection while using Snowflake and SSO · Issue #2742 · dbt-labs/dbt-core · GitHub](https://github.com/dbt-labs/dbt-core/issues/2742)) or don’t seem quite relevant, since authentication did succeed ([Snowflake Community](https://community.snowflake.com/s/question/0D50Z00009FzO5jSAF/why-im-getting-below-error-is-this-user-setup-issue250001-08001-failed-to-connect-to-db-testdatasnowflakecomputingcom443-the-user-you-were-trying-to-authenticate-as-differs-from-the-user-currently-logged-in-at-the-idp)).

Any suggestions for what I might be looking at/for?

(Note the first time I tried this, I had threads set to four, and it brought up _four_ browser windows, which is its own problem…)

---

<div class="post-metadata">

**Author:** ![pablotolo](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@pablotolo](https://discourse.getdbt.com/u/pablotolo)\
**Post date:** [May 29, 2024, 2:49pm UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/2 "2024-05-29T14:49:31Z")

</div>

Hi, I am having the same issue here with

dbt-snowflake = “== 1.8.0”  
dbt-core = “== 1.8.0”

I launch a dbt run and it keeps opening browser windows to authenticate until the dbt run finishes.  
I’ve only seen this answer for me it does not work: [dbt-core opens multiple browser window for SSO Authentication, is there a way to prevent it ?](https://discourse.getdbt.com/t/dbt-core-opens-multiple-browser-window-for-sso-authentication-is-there-a-way-to-prevent-it/9469)

Any ideas on how to solve it?

Thank you!

---

<div class="post-metadata">

**Author:** ![ry\_khalili](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@ry\_khalili](https://discourse.getdbt.com/u/ry_khalili)\
**Post date:** [June 3, 2024, 11:07am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/3 "2024-06-03T11:07:25Z")

</div>

Hi Denised,  
Do you find any solution for this issue?

---

<div class="post-metadata">

**Author:** ![denised](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/denised/32/3460_2.png) [@denised](https://discourse.getdbt.com/u/denised)\
**Post date:** [June 4, 2024, 5:05am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/4 "2024-06-04T05:05:03Z")

</div>

No I didn’t. We reverted to not using SSO for our dbt work.  
Just recently we attempted to add MFA and ran into essentially the same difficulty: we’d get one MFA prompt for each query that dbt ran.

---

<div class="post-metadata">

**Author:** ![denise](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/denise/32/3224_2.png) [@denise](https://discourse.getdbt.com/u/denise)\
**Post date:** [June 5, 2024, 12:15am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/5 "2024-06-05T00:15:34Z")

</div>

Looking through the info I can find, it seems like SSO or MFA caching [may not be implemented on Linux](https://docs.snowflake.com/en/user-guide/security-mfa#using-mfa-token-caching-to-minimize-the-number-of-prompts-during-authentication-optional), which means that it won’t work on our docker devcontainer. Can anyone confirm whether or not either SSO or MFA is expected to work with dbt-snowflake on Linux?

---

<div class="post-metadata">

**Author:** ![denise](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/denise/32/3224_2.png) [@denise](https://discourse.getdbt.com/u/denise)\
**Post date:** [June 5, 2024, 12:58am UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/6 "2024-06-05T00:58:36Z")

</div>

Hey, I got MFA to work! The missing piece was that I needed to set the “authenticator” attribute to “username\_password\_mfa” in profiles.yml. This worked for dbt in a Linux devcontainer.

---

<div class="post-metadata">

**Author:** ![guostong](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/guostong/32/6274_2.png) [@guostong](https://discourse.getdbt.com/u/guostong)\
**Post date:** [March 11, 2026, 3:11pm UTC](https://discourse.getdbt.com/t/connecting-to-snowflake-via-sso/12228/7 "2026-03-11T15:11:05Z")

</div>

is there anybody tries SSO with MFA?
