This SharePoint tutorial explains how to solve error Microsoft.SharePoint.SPException. The security validation for this page is invalid and might have corrupted. Please your browser’s back button to try your operation again. status 403, FORBIDDEN.
Recently while I was trying to create a group by using Rest API in SharePoint 2013, I got the following error message. Microsoft.SharePoint.SPException. The security validation for this page is invalid and might have corrupted. Please your browser’s back button to try your operation again. status 403, FORBIDDEN. The error can come in SharePoint 2013/2016 or SharePoint Online.
The error was coming like below:
This error usually comes when you any POST Rest API call.
Solution to the security validation for this page is invalid and might be corrupted rest SharePoint
Add the “X-RequestDigest” header, with the value of the hidden input field “__REQUESTDIGEST” which is the form digest value. Like below:
headers: {
“Accept”: “application/json; odata=verbose”,
“X-RequestDigest”: $(‘#__REQUESTDIGEST’).val()
}
You may like following SharePoint Rest API tutorial:
- Update People Picker Group field using Rest API and jQuery in SharePoint 2013
- SharePoint 2013 Add Top Navigation Link to a Site Using REST API
- Send Email with jQuery and REST API in SharePoint
- KnockoutJS SharePoint 2013 CRUD Operations using REST API
- SharePoint 2016 crud operations using Rest API and jQuery on SharePoint list or document library
- How to Trigger Sharepoint 2013 Designer workflow on a list item by calling REST API using jQuery?
- Create, Update and Delete SharePoint List using Rest API in SharePoint 2013/2016/Online
- Bind SharePoint Online List Data into HTML table using jQuery and Rest API
- SharePoint Online Branding: Display List items into a page using AngularJS and REST API in SharePoint online or SharePoint 2016/2013
Once you add “X-RequestDigest”: $(‘#__REQUESTDIGEST’).val(), then the error the security validation for this page is invalid and might be corrupted rest SharePoint will not appear.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Eta tathapi asuchi bhai kan kariba??
Au kichi syntax error achi ki?