24
Views
3
Comments
[Snowflake Connector] Getting invalid username and password when using snowflake connector
snowflake-connector
Service icon
Forge asset by Rita Tomé
Application Type
Service
Service Studio Version
11.54.61 (Build 63317)

Hi

I am trying to run a query as done in the snowflake demo project but i am getting "invalid username and password" error message. i am passing oauth token in the extraparameter variable for authentication.is there any other configuration we need to do before we start using snowflake connector component ? if yes, please provide the steps

Thanks

Kumar

2019-01-07 16-04-16
Siya
 
MVP

Please see if this discussion helps.

UserImage.jpg
saravanakumar v

Hi Siya

The topic contains basic information. I need some more information regarding extraparameters as we are passing oauth token for authorization but getting invalid username and password. is any body has passed oauth and did the connection that will be helpful. i am passing the information like this "authenticator=oauth;token={bbb}";

Thanks

kumar

2019-01-07 16-04-16
Siya
 
MVP

Was looking at the Snowflake connector extension I could see the connection string as 

           string connectionString = "SCHEMA=" + ssScheme + ";DB=" + ssDatabase + ";ACCOUNT=" + ssAccount + ";HOST=" + ssHost + ";WAREHOUSE=" + ssWarehouse + ";USER=" + ssUsername + ";PASSWORD=" + ssPassword + ";" + ssExtraParametersForConnectionString;

In your case, you will pass the password as empty and use "authenticator=oauth;token={bbb}" as ssExtraParametersForConnectionString, which seems correct. By the way, how did you generate the token, and have you tested OAuth with the generated token? You can create a sample application in Visual Studio, add a reference to the Snowflake connector, and then invoke the MssRunQuery method from the extension to debug and see what is going wrong.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.