I have been using the SPServices UpdateListItems code below for several years on an on-premise SharePoint 2013 Enterprise server without any issue. However, we recently migrated to a new cloud-based SharePoint 2013 Enterprise server (managed by another department) and now this code is returning a 403 FORBIDDEN status. This isn't just for this one UpdateListItems call, it is for every one that I have in all of my sites. I cannot figure out what is going on and am beginning to think it is with the server configuration. I have re-written the UpdateListItems code as REST and it fails as well. The response text errorstring is not very helpful, as refreshing the browser page does not help, no matter how many times I refresh it. Any help would be greatly appreciated.
//variables req and proj are passed to the function and are validated before use. $().SPServices({ operation: "UpdateListItems", async: false, listName: "Requests", ID: req, valuepairs: [["Project",proj]], completefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { }); } }); Response Text:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring> <detail> <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.</errorstring> <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x8102006d</errorcode> </detail> </soap:Fault> </soap:Body> </soap:Envelope>