[noob] Can I use SPServices from outside the SP site ?

Jun 14, 2013 at 11:43 AM
All is in the title, but let's be more specific.

After reading the first steps documentation, I realize that the page using the SPservices is hosted within the SP site.
But I'd want to read the content of a SP list from an external site (different domain, non SP site, SQL server and Colfusion 8). Even noobish as I am, I forecast big troubles with credentials.

So I'm just wondering ... if I'm in the right place ;)
Ad if, by luck I am ... could anyone lead me to appropriate example or documentation ?

Thanks for your time, sry for this level 0 question ...
Jul 18, 2013 at 8:06 PM
I have the same question. I'm primarily an Oracle developer and create a lot of web apps with Application Express. I've been asked to make my applications more "Sharepoint like", but I have virtually no experience with Sharepoint. The main things I'm looking for right now are automatic login of the current OS user and display of the presence icon beside usernames. I've been doing a lot of googling, and this package seems to be the most promising lead I've found so far. I'm just not clear if it only works on SP pages, or if I can use the library on my Application Express pages to "borrow" the desired functionality from our Sharepoint server. Or if there's a better approach out there.

I'm continuing to dig into it on my own, but if anyone can provide some info to save me some time, it would be much appreciated.
Jul 18, 2013 at 10:39 PM
Hi Shayz,

Hopefully this will help:

AFAIK, SPServices can be used outside of Sharepoint, but you will come across issues with credential challenges - SharePoint deals with this automatically, without the user knowing about it, hence why its better to work in SharePoint, then outside of it.

I think it would help to know more about this "Sharepoint like" feel that you've been asked to add - is this because you have a number of users who use your apps, but who want to use them as if they were already built into SharePoint, and not standalone? Or - is it a case of your users already use SharePoint, but don't want to have to shell out to a separate app outside of SharePoint?

I ask, as I think it is possible to get iView webparts that can be used to display content built in apps such as Application Express. I've seen this done before with SAP pages in SharePoint 2007, so think it might be worth taking a look? You might need to look at Single Sign-On in SharePoint, which will pass through the authentication values to Oracle - it can be a bit fiddly to set up, depending on which version of SharePoint you use, but it is worth it.

If you can change the focus of where your content is displayed to be in SharePoint, and not in Oracle, then displaying presence icons is a breeze - take a look at something like http://geekswithblogs.net/jacobladams/archive/2011/05/03/use-hmtl-and-javascript-to-display-presence-controls-in-sharepoint.aspx. You will likely need to alter the code a little, to use SPGetCurrentUser - you will need to be using the same user name in both environments for it to work.

Alternatively, if you can produce HTML pages of some description from AE, you can ask one of your SharePoint admins to look at adding the components from a SharePoint master page to it, so it can be used from within SharePoint. Master pages are basically template pages - you can usually incorporate the elements from them into non-SP pages, as long as the original page can be set up as a ASP.NET page.
Jul 19, 2013 at 5:34 PM
Thanks for the feedback. At the moment the only Sharepoint features I'm trying to implement in APEX are automatic authentication and presence icons. I've written a function in Oracle to authenticate users against Active Directory so they can log into my apps with their network credentials instead of having to maintain separate accounts, but they still have to type their username/password every time. They want the apps to just know who's logged into the computer like Sharepoint does. I found a method to get the OS user with some javascript and an ActiveX control, but it requires the user to grant permission to run the control every time. Whatever Sharepoint is doing to get the user doesn't do this. I was hoping to use SPGetCurrentUser in the APEX login page to let Sharepoint handle that part.

I've tried the method in the link for displaying presence icons, but haven't been able to get it to work yet. It says it's for Sharepoint 2007. We're on 2010. I don't know if this is the reason or not.

As for getting the admins to do anything, the probability of that happening is so low it's not even worth asking.
Jul 19, 2013 at 6:34 PM
Hi Shayz,

Hehe - I know what you mean about admins! It might be worth asking - the worst they can do is say no, so if they do, at least you know where you stand.

SharePoint is able to accept authentication from external claims providers, such as Oracle - I would do a search on google for this? One article I've come across which might be worth a look is http://sharepoint-community.net/profiles/blogs/external-authentication-providers-for-sharepoint-2010-oracle-su-1; I would say that this is probably the key bit that you need to get sorted first, before looking at anything else. Otherwise I suspect that no matter what you do, you will always have the credential challenge problem...!