Skip to content
Albert-Jan Schot
Albert-Jan Schot

· 1 min read

Post

SharePoint: The security validation for this page is invalid

Today I found myself running into the ‘famous’ “The security validation for this page is invalid” error and it cost me quite some stress figuring out what went wrong, and why I wasn’t allowed to do what I wanted, a simple change to a user profile.

The thing is that everything worked fine, until I actually added the UserProfile.Commit() to apply the changes to my profile. So after some searching the web for something that could help me further (besides the run with elevated privileges), and some helpfrom my colleague Peter we found the following article: The security validation for this page is invalid. Basically the idea is: forget the AllowUnsafeUpdates(); and add a FormDigestControl to the page you are working on, as you can see it only takes a reference:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>

And a control:

<SharePoint:FormDigest runat=server/>

Further info can be found on the mentioned blog.

Albert-Jan Schot

Albert-Jan Schot

CTO, Microsoft MVP & FastTrack Recognized Solution Architect

I am Albert-Jan Schot, CTO at Blis Digital, Microsoft MVP, and FastTrack Recognized Solution Architect focused on Microsoft 365, Azure, and AI agents. I help teams turn complex Microsoft Cloud challenges into practical architecture decisions and shipped outcomes.

Copilot Studio Microsoft 365 Agent Flows

Zuid Holland, Netherlands

Related Posts