Snowflake SSO with OKTA using python

187 Views Asked by At

I am trying to run snowflake using python and i don't want to authenticate through external browser each time i run a query. I saw there is a possibility of Native SSO — Okta only i have tried that using the code below:

 with snowflake.connector.connect(
        user="user",
        password="password",
        authenticator='https://<okta_account_name>.okta.com',
        account = "account_name",
        #token=access_token

I get an authentication error each time,even tho my credentials are correct. I thought about replacing the password with access_token gained from okta authentication is it a better way?

using okta token,simulating externalbrowser authenticator

0

There are 0 best solutions below