BookmarkSubscribeRSS Feed
PooryaShidfar
Calcite | Level 5

I am trying to use SAS ODBC to connect to my company's Snowflake account using SSO via an external browser. I was able to connect it with a macro and the User / Password as seen below:

 

%macro libname_snowflake(
connName /* Choose the local DB name */
,schema /* Choose the Oracle-like schema (owner) name */
);

 

/* This should minimize code rewrites with schema alias. */

%if &schema. = CS %then %do;
%let db=PUB_DATA;
%end;

 

* This presumes all schemas will begin with string PUB */

%else %if %substr(&schema., 1, 3) = PUB %then %do;
%let db=&schema.;
%end;

 

 

libname &connName. SNOW server="<MyCompany>.snowflakecomputing.com"

     user=MyUserName
    pw="***************************"
    DATABASE=&db.
warehouse=REPORTING
schema=DATA_VENDING
role=MyRole
readbuff=1024
insertbuff=1024
dbcommit=0
TRACE=YES
SQLGENERATION=DBMS
conopts='sslmode=required'

;

%mend libname_snowflake;

 

I have seen on the web and the SAS support communities where I can modify the authentication segment to use the SSO with an external browser like below:

 

CONOPTS=('authenticator=EXTERNALBROWSER', 'URL=<your_sso_url>')

 

Has anyone successfully implemented this in SAS 9.4 X64 WIND PRO platform? Please, point me in the right direction. Thanks for the support. 

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 2413 views
  • 0 likes
  • 1 in conversation