How to login to a SharePoint site from a external Host

Jun 1, 2011 at 6:14 PM

Hey everyone !

I would like to know how to login to a sharepoint site through a SPServices function from a external host.

Actually I´m trying to develop a windows gadget for windows vista and windows 7.

The main idea is to add items to a sharepoint list from this gadget.

Here is a sample of my code:

 function Atualiza(){
    $().SPServices({
   webURL:"http://mydomain/mysite",
   operation: "UpdateListItems",
   async: false,
   listName: "myList",
   batchCmd: "New",  
   valuepairs:  [["News_x0020_Type","Highlight"],       
      ["Project_x0020_Name","Title placed here"],          
      ["Title","XXXX-XXX"],                            
      ["Description","updating this desccription"],     
      ["Action_x0020_Plan",""],                            
      ["OpCo","Operation"],                                 
      ["Pillar","New business capabilities"],              
      ["Management_x0020_Type","Delivery Management"]      
      ],
   completefunc: function (xData, Status){
     alert("Completed.");
   }

    });
 }

The worst thing is that this code runs normaly when it is into a sharepoint path.

I hope someone can help me.

Thanks

Best Regards

Coordinator
Jun 1, 2011 at 6:19 PM
Simple answer: You can't.
http://sympmarc.com/2011/05/27/elevating-permissions-with-sharepoints-web-services/

M.
>
Jun 25, 2011 at 5:32 PM

So SPServices cannot be used externally to a SharePoint site? e.g. from a remote application using SharePoint list as a backend.

Coordinator
Jun 25, 2011 at 7:45 PM
Edited Jun 25, 2011 at 7:45 PM

Sure it can, as long as the user is already authenticated. In the most common situation, where you are using Windows authentication all around, the Web Services calls will work fine.

You can also set up SharePoint lists to be accessible to anonymous users.

M.

Feb 20, 2012 at 3:07 PM

This is disappointing. I was excited to use this to simplify my external ajax calls to sharepoint. /sigh