I called a web service in SharePoint designer with HTTP delete:


The workflow returned "Forbidden" response status and the ULS log :

Exception occured in scope Microsoft.SharePoint.SPRoleAssignment.DeleteObject. Exception=System.Runtime.InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

2 Answers 2


You need to send a security token (Request Digest) within your request header. It is stored in a html input with the DOM ID __REQUESTDIGEST on every site. E.g. an ajax call:

    headers: {
        "Accept": "application/json; odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val()

The lack of the token is mostly the course of the mentioned error

  • add it into the request header in the sharepoint designer?
    – user48429
    Commented Nov 18, 2015 at 8:46
  • name : X-RequestDigest ; type : string ; value : $("#__REQUESTDIGEST").val(). I have add this to the request header, the status is still forbidden.
    – user48429
    Commented Nov 18, 2015 at 9:45

As @Dave mentioned, you need to specify the request digest to perform write operations in a REST call. But:


is JavaScript/jQuery code for obtaining the request digest, suitable for putting on a browser based form, but you can't use JavaScript in SharePoint designer.

In designer, you need to first call the web service _api/contextinfo to get the request digest, and then assign that request digest to the X-RequestDigest header and make the delete call.

Ref: SharePoint Designer Call HTTP Web service with RequestDigest

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.