DATA Step, Macro, Functions and more

SAS access to SharePoint

Reply
Super User
Super User
Posts: 6,499

SAS access to SharePoint

Does anyone have successful methods for accessing files stored in SharePoint sites using SAS programs running on Unix (or other non-Windows platforms)?

The best answer I have been able to find involves using the unix command utility curl rather than native SAS capabilities.

xml - SAS PROC SOAP to update Sharepoint List - Stack Overflow

Valued Guide
Posts: 3,208

Re: SAS access to SharePoint

Tom, did you see: SAS(R) 9.4 Intelligence Platform: Installation and Configuration Guide ? (Overview of Deploying SAS Web Parts for Microsoft SharePoint) it is using proc soap.
SharePoint is a web-based access for some classic data (sky-drive cloud-one).  What is coming in with that is identification/authentication. Microsoft did hide that with their desktop approach (IWA).

Connecting must be possible when working on that (unix based) users evaluated the Windows only approach as more easy to do (manual actions).   

---->-- ja karman --<-----
Super User
Super User
Posts: 6,499

Re: SAS access to SharePoint

Thanks Jaap.  To me that looks more like a way to publish information in SharePoint sites that is being produced by SAS code.

I was more thinking about how to allow users of SAS to access information that is currently being stored in SharePoint, mainly in Document Libraries.  Preferably with just BASE SAS.  I can reference those files using simple URL notation on my PC (http://<server>/<site>/Shared%20Documents/example.xlsx ) but when I try to reference the file using SAS code similar to Chris H's example blog post:

http://blogs.sas.com/content/sasdummy/2012/12/18/using-sas-to-access-data-stored-on-dropbox/

I get access denied messages back instead of the file.  If I use curl instead then I can tell it how to authenticate to SharePoint and I can retrieve the file.

Valued Guide
Posts: 3,208

Re: SAS access to SharePoint

Yep webparts is for publishing SAS content into sharepoint. The interesting sentence there is that proc soap is used. You already did find that.
We are knowing SAS is too far behind with following all that fast evolving interfaces. Secure mail, procies with authentication and sites with authentication is making it all more difficult.
filemethods with url http sftp socket ,  proc http,  proc soap you have to do a lot to understand and use them.    

In socket mode you could do all the programming of building interfaces as it the most basic one.
Filename WebDAV should be the one for that interface. SAS(R) 9.4 Statements: Reference, Third Edition but other wise is would be sftp https.

As you are getting through using curl, what is that you have done there. cURL - Wikipedia, the free encyclopedia  it supports a lot.
Just see what has added to the filename sftp with 9.4 SAS(R) 9.4 Statements: Reference, Third Edition

This could you leaving to use curl by piping and the xcmd usage :smileygrin:

---->-- ja karman --<-----
Super User
Super User
Posts: 6,499

Re: SAS access to SharePoint

The -SSPI configuration option seems to be required for use with SharePoint.

3    filename in webdav &infile debug user='zzzz' pass=XXXXXXXXXXXX recfm=s ;

ERROR: The server is requesting single sign-on, but the SSPI option has not been specified.

So I restarted SAS with the -sspi command line option, but it looks like there is more that I need to do.

I think that I need to get my system administrators involved to figure out what else is required.

4    filename in webdav &infile debug user='zzzz' pass=XXXXXXXXXXXX recfm=s ;

Collection handle creation failed.

ERROR: Insufficient authorization to access http://...

Frequent Contributor
Posts: 115

Re: SAS access to SharePoint

Hello Sir, We at L&T Infotech,India exactly encountered the same problem in our on going project last week and after despairing attempts, we could not still not get SAS to access sharepoint. We raised a ticket with SAS technical support in india and after their failed attempts the ticket was transferred to SAS USA, nonetheless the issue has still not been resolved and the ticket is still open. Yes, SSPI option was the recommendation they gave and bore no fruit.

However, we did a work around downloading the file with a VB script and also tried calling the VB script from batch script and that worked fine. For now, we have chosen to go with this approach.

If you need more help, i will try to get more details from my admin and see what best I can share with you that made us progress in our project. Wishing you a merry Christmas!!!!

An excerpt from my SAS Admin that I can share:

"We tried downloading sample file from sharepoint sites using sas code by making changes in the configuration files. The success rate is 1 out of 10 means the same sas code which had successfully downloaded the file was ran without making any changes to it; it fails giving multiple errors as below. We are getting 2 type of errors for same set of code, technical support  track was raised with SAS India and this was shown to them via web-ex session and they are following up with US technical support for the fix since they are not able to solve it"


And another one from SAS tech support:-

"Hi Naveen,

You need to start the SAS session that you are running Proc Http from with the "-sspi" option

Example:

sas -sspi

Let us know if that fixed that error

if you using windows You should be able to right click on the SAS 9.4 icon and select properties. There should be Short cut tabl with a target defined. You should be able to add the option there."


Ask a Question
Discussion stats
  • 5 replies
  • 2643 views
  • 0 likes
  • 3 in conversation