1

I have one problem.

On a sharepoint 2013 there is one way to modify list for example with REST call.

So the get call are OK (read-only) the post call to site/_api/contextinfo is ok i retrieve the token

but when i call another post (PUT) for example with X-RequestDigest and NTLM authentication i have this error :

{"error":{"code":"-2130575251, System.Runtime.InteropServices.COMException","message":{"lang":"en-US","value":"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."}}}

an Idea ?

1
  • Now i use basic authentication but always same problem, no one have an idea?
    – cyril
    Oct 2, 2014 at 8:19

2 Answers 2

0

Check this answer: https://stackoverflow.com/a/32824960/5243272 You have to add the request digest form to your body tag.

<form runat="server">
     <SharePoint:FormDigest ID="FormDigest1" runat="server"> </SharePoint:FormDigest>
</form>
0
0

I'm not clear you are trying to access SharePoint Online or not, I assume your trying to access SharePoint online cause, you said you generate BinarySecurityToken.

Basically, you need to pass three values as a header in your RESTfull call.

  1. rtFa as Cookies
  2. FedAuth as Cookie
  3. FormDigestValue as X-RequestDigest

In order to get rtFa & FedAuth you need to pass BinarySecurityToken to your SPO site, SPO single sign on process will genarate these authentication Cookies after validate your token.

This link will guide you to generate above mentioned values, https://denuwanhimangahettiarachchi.blogspot.com/2017/03/generate-sharepoint-online-rest-api.html

1
  • 4 years ago don't remember how i do to make it work, sorry i had to add the response as i am doing now... thanks all
    – cyril
    May 19, 2017 at 7:12

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.