I am trying to access intranet site using SAS URL filename.
filename Candies URL "http://insite.xxxx.com/xxxx/xxxx.html" debug puser="abcdef" ppass="xxxxxx";
data _null_;
infile Candies length=len;
input record $varying200. len;
put record $varying200. len;
if _n_=15 then stop;
run;
log:
NOTE: >>> GET /xxxx/xxxx.html HTTP/1.0
NOTE: >>> Host: xxxx.xxxx.com
NOTE: >>> Accept: */*.
NOTE: >>> Proxy-Authorization: Basic YzY5MTkyOnh4eHh4eA==
NOTE: >>> Accept-Language: en
NOTE: >>> Accept-Charset: iso-8859-1,*,utf-8
NOTE: >>> User-Agent: SAS/URL
NOTE: >>>
NOTE: <<< HTTP/1.0 302 Object Moved
NOTE: <<< Expires: Thu, 01 Dec 1994 16:00:00 GMT
NOTE: <<< Location:
http://xxxx.xxxx.com/siteminderagent/ntlm/creds.ntc?CHALLENGE=&SMAGENTNAME=-SM-47H8Wn
NNzFyE3UZYD%2bIfBdnJKDkWWSzZs%2bhUkvpF7jRaPuKbfBYqQL0n%2bRzZmsti&TARGET=-SM-http%3a%2f%2fin
site%2exxxxt%2ecom%2fxxxx%2fdefault%2ehtml
NOTE: <<< Content-Length: 0
NOTE: <<<
NOTE: >>> GET
/sitemxxxeragent/ntlm/creds.ntc?CHALLENGE=&SMAGENTNAME=-SM-47H8WnNNzFyE3UZxx%2bIfBdnJKDkWWS
zZs%2bhUkvpF7jRaPuKbfBYqQL0n%2bRzZmsti&TARGET=-SM-http%3a%2f%2finsite%2exxet%2ecom%2fPxxj
ectxOxe%2fdxxxault%2ehtml HTTP/1.0
NOTE: >>> Host: ixxxxet.xxxx.com
NOTE: >>> Accept: */*.
NOTE: >>> Proxy-Authorization: Basic YzY5MTkyOnh4eHh4eA==
NOTE: >>> Accept-Language: en
NOTE: >>> Accept-Charset: iso-8859-1,*,utf-8
NOTE: >>> User-Agent: SAS/URL
NOTE: >>>
NOTE: <<< HTTP/1.1 401 Unauthorized
NOTE: <<< Content-Length: 5064
NOTE: <<< Content-Type: text/html
NOTE: <<< Server: Microsoft-IIS/6.0
NOTE: <<< WWW-Authenticate: Negotiate
NOTE: <<< WWW-Authenticate: NTLM
NOTE: <<< X-Powered-By: ASP.NET
NOTE: <<< Date: Thu, 19 Mar 2015 19:12:46 GMT
NOTE: <<< Connection: close
NOTE: <<<
ERROR: Unauthorized to retrieve URL. Use the debug option for more info.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.48 seconds
cpu time 0.04 seconds
I have contacted SAS tech support and they have pointed me to this SAS notes. This doesnt help. Please advise.
Usage Note 15692: URL filename engine only supports BASIC authentication on web server
When you attempt to read web server data using the URL filename engine, the following error message might appear
ERROR: Unauthorized to retrieve URL
and with the DEBUG option
NOTE: <<< HTTP/1.1 401 Unauthorized
even when supplying valid credentials with the USER and PASS options. Using the DEBUG option on the filename might show the cause to be the web server's use of an authentication method other than BASIC. Notice
the DEBUG line below:
NOTE: <<< WWW-Authenticate: NTLM
The URL engine will not properly authenticate to a web server unless it uses the BASIC authentication protocol.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.