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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.