Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: SPServices across domains

I ran into a similar problem once. There are a handful of web services available to return user information from a site. I finally achieved success across domains using the operation "GetAllUserCollectionFromWeb" and setting CORS support to true such as...
$.support.cors = true;                     //Enable Cross-Origin Resource Sharing
$().SPServices({
    operation: "GetAllUserCollectionFromWeb",
    async: false,
    webURL: strSiteURL,
    completefunc: function(xData, Status) {
        $(xData.responseXML).SPFilterNode("User").each(function() {
            //Do stuff here
        });
    }
});
I am able to get user lists from all of my site collections across all of my domains using this method.

Geoff

Viewing all articles
Browse latest Browse all 6517

Trending Articles