This project has moved and is read-only. For the latest updates, please go here.

GetListItems not working on Claims site with FBA

Sep 30, 2013 at 10:58 PM
Edited Oct 1, 2013 at 12:52 AM
Hello everyone,

I cannot seem to get SPServices/GetListItems to work on a site that is setup with Claims and Forms Based Authentication. I've veryified that my references are correct by using the below Hello World script:
<script type="text/javascript">
alert ("js on.");
$(document).ready(function() {
alert ('jQuery on.');
var thisSite = $().SPServices.SPGetCurrentSite();
alert ('Hello World! Your site is : ' + thisSite );
I have no problems with GetListItems on all of my other sites which includes a site with Claims but no Forms Based Authentication. Is there anything I can do to trouble shoot what is going on? It may not be that Claims and FBA are what's causing my issue, but at the moment that is the only thing that is different between all of my sites.

Thanks in advance,
Oct 1, 2013 at 1:23 AM
What's the problem :)

Can you post your code around the call to GetListItems operation including any errors you may be getting/seeing.



Paul T

Oct 1, 2013 at 4:17 PM
Edited Oct 1, 2013 at 4:25 PM
Hi Paul,

Thanks for the reply.

My code is working on all my other environments, I also tested with the sample GetListItems code straight from the documentation here on this site. Again, the sample code worked on all of my environments except for the environment that is on Claims with FBA.

Also, I'm not getting any errors, I'm using a CQWP.

Here is the sample code I used.
<script type="text/javascript" src="filelink/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="filelink/jquery.SPServices-0.6.2.min.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function() {
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
<ul id="tasksUL"/>
Oct 2, 2013 at 5:41 PM
Edited Oct 2, 2013 at 5:41 PM
I got it to work.

For some reason everything worked after adding the webURL parameter into the code. I'm not sure why this was required in this case, maybe someone can shed some light into that for future reference.
webURL: "mywebURL",
listName: "myList",
Oct 2, 2013 at 11:20 PM
Glad you got passed it.

Regarding the cause. What version of SPServices? And was this running from the root web collection?

Marc has some bug(s) pending around webURL when SPServices is used from the root site. Maybe that was the cause.



Paul T

Oct 3, 2013 at 12:39 AM
Hi Paul,

I'm using release 2013.01 of SPServices.

And yes, everything in this particular case is on root web. The other sites where everything was working without the webURL parameter are not on the root web.

Oct 3, 2013 at 12:42 AM
I'm pretty sure that's the problem them. An the workaround for now is to explicitly set the option on input.


Paul T

Oct 4, 2013 at 2:52 PM
Yup, Paul's right about the root web bug. Sorry about that.

Please watch this issue for resolution: