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.
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()
}
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.
You may like the following SharePoint Rest API tutorial:
- SharePoint 2013 list item level permission using REST API
- SPUtility.js SharePoint 2013 tutorial and Examples
- SharePoint list operations using rest api
- SharePoint rest api create folder
- Display SharePoint list data in jQuery data table using Rest API
- How to get SharePoint list items using Rest API in Microsoft Power Automate
- How to get documents from document library in SharePoint using Rest API
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.
Eta tathapi asuchi bhai kan kariba??
Au kichi syntax error achi ki?