Closed andytwigg closed 1 year ago
It succeeds if I set authentication='externalbrowser'
but fails with okta.
Do you have MFA enabled on Okta side?
Yes
@andytwigg Apologies for the delayed response. Native Okta authentication is not supported if Okta MFA is supported. We support browser based authentication in the scenario(authentication='externalbrowser')
You can also explore external oAuth with Okta if your use case involves headless login(with no browser access).
We're also running into this issue - would be really great for the native okta authentication to support MFA
We have okta + MFA and want headless login to work as well. I'm seeing the same error message as reported. I'd love it if it Just Worked :)
I don't think this is specific to the snowflake python connector. This just started happening to us this weekend when we updated our Okta account from Okta Classic to Okta Identity Engine. After that all of our Python, C#, and ODBC connectors using an Authenticator url (https://accountname.okta.com) instead of "externalbrowser" started receiving the error message listed here. These integrations work working fine for us for over a year prior to the update.
Anyone find a fix?
Hi all, headless + MFA can't work. MFA reads (as you know) MULTI factor auth. With the initial login, you can provide only one factor (above: user/pass). Then, Okta determines which other factor should be used and sends this [redirect] to the caller.
However, you can specify in OKTA (Identity, Classic not tested) that the snowflake integration must not use MFA.
Can you try the below solution @rwilliams-mpg and see if this works.
https://community.snowflake.com/s/article/Destination-URL-mismatch-when-using-Native-OKTA-SSO
Our issue was related to Okta Identity Engine (OIE) support in the Python connector that we were using. If we had upgraded to the latest versions of the Python connector the issue would have fixed itself since it was patched in v2.7.12 with release notes showing "Added support for OKTA Identity Engine". We missed it at the time because there were so many scenarios that were broken and not all codesets had updated to add OIE support. (ex: C# didn't patch until Jan 2023, after I posted my message above)
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)? 3.8.3What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)? macOS-10.16-x86_64-i386-64bitWhat are the component versions in the environment (
pip freeze
)?success, the cursor object.