BookmarkSubscribeRSS Feed
vkrishna
Quartz | Level 8

Hello All,

 

I'm trying to run the following SAS code but struck with "Unauthorized to retrieve URL" error.

In SAS usage note :15692 it is reported as "FILENAME statement URL access method supports only BASIC authentication on a web server"

Can someone help me with this? 

How to pass this error?

 

filename CANDID url "http://xxxxxxxxxxxxxxxxxxxxxxxxx"
debug; 
libname CANDID json;

LOG:
filename CANDID url "http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
27 debug;
28 libname CANDID json;
NOTE: JSON data is only read once. To read the JSON again, reassign the JSON LIBNAME.
NOTE: >>> GET xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.0
NOTE: >>> Host: xxxxxxxxxxxxxx
NOTE: >>> Accept: */*
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: <<< Cache-Control: private
NOTE: <<< Content-Type: text/html; charset=utf-8
NOTE: <<< Server: Microsoft-IIS/8.5
NOTE: <<< X-MiniProfiler-Ids: 
 ["9ecc8ffa-f2b0-453a-a666-257128cf9e99","cd5fc783-7708-4aae-ae34-a06876951acf","2b0b37ab-05f3-478a-b68f-0e949395fc1d","ed24980
 0-fcdc-4cf5-89e8-abc90bc7209a","06c21540-5fd6-471d-a205-6eaa8b4a7eda","56c40204-7c1a-4c69-8a83-3aaa7543f954","
NOTE: <<< WWW-Authenticate: Negotiate
NOTE: <<< WWW-Authenticate: NTLM
NOTE: <<< X-Powered-By: ASP.NET
NOTE: <<< X-UA-Compatible: IE=edge,chrome=1
NOTE: <<< Date: Wed, 31 Jan 2018 23:22:25 GMT
NOTE: <<< Connection: close
NOTE: <<< Content-Length: 6025
NOTE: <<< 
ERROR: Unauthorized to retrieve URL. Use the debug option for more info.
ERROR: Error in the LIBNAME statement.

 

Thanks,

Vamsi

 

2 REPLIES 2
ChrisHemedinger
Community Manager

I prefer PROC HTTP for this work -- it provides more authentication and debugging options.

 

What type of website are you accessing?  Is it Sharepoint?  That might require a special authentication.

vkrishna
Quartz | Level 8

Hi @ChrisHemedinger,

 

Is it Sharepoint?

No

 

What type of website are you accessing? 

The website I'm trying to access is using ASP.NET impersonation and windows authentication. We want to create data set directly from URL instead if creating Json file and again read that file into the SAS using Data step.

 

Is it possible to use Filename statement with URL for the authentication that I mentioned above or Is there any way to pass the credentials?

 

Thanks,
Vamsi

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 776 views
  • 1 like
  • 2 in conversation