BookmarkSubscribeRSS Feed
AZIQ1
Quartz | Level 8

Hi,
I used proc pwencode to generate encrypted password but when trying to use it with ODBC connection to Azure server it's not recognizing it and gives error.
Code is

 

%let ts_pwd = {SAS003}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;

 

LIBNAME TEST ODBC DATAsrc=‘XXX'

USER="ABC"

PWD= "&ts_pwd"

SCHEMA=ABCXYZ

CURSOR_TYPE=FORWARD_ONLY;

 

 

ERROR: Failed to authenticate the user ‘ABC’ in Active Directory (Authentication option is 'ActiveDirectoryPassword').  Error code 0xCAA20003;

       state 10  ID3242: The security token could not be authenticated or authorized.

ERROR: Error in the LIBNAME statement.
Any ideas or suggestions please !

Thanks

3 REPLIES 3
SASKiwi
PROC Star

Does it work correctly unencrypted? Have you tried {SAS001} or {SAS002} encryption? If any of these work but {SAS003} encryption doesn't then a track with SAS Tech Support good be a good idea.

AZIQ1
Quartz | Level 8
Yes it does work unencrypted. I used SAS003 encryption.

Or any ideas how can I embed my password in the code so that no one sees my password when they open my program. I cannot save it on my local drive and call the program

Thanks
Sajid01
Meteorite | Level 14

Hello @AZIQ1 
Looks like you want to hide the password.
Create an Authentication domain for the server and store password in the metadata sever.
use the authentication domain in the libname statement.
The statement would be something like this

libname mydblib odbc datasrc=mydatasource Authdomain=myothdomain ;;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 734 views
  • 0 likes
  • 3 in conversation