Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

sprLib.folder().add() requires requestDigest / security token #55

Open
joske500 opened this issue Jun 17, 2019 · 1 comment
Open

sprLib.folder().add() requires requestDigest / security token #55

joske500 opened this issue Jun 17, 2019 · 1 comment

Comments

@joske500
Copy link

Hi,

I'm using the SpRestLib in Node and was unable to make sprLib.folder().add() work, I always got the error message "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.".
When I do the call manually via
sprLib.rest({ type: "POST", url: vURL, requestDigest: token, metadata: false })

It does work, it seems that SharePoint expects the requestDigest for folder add operations as well.

@dennythecoder
Copy link

It appears that the request digest is not sent on the method at https://github.com/gitbrent/SpRestLib/blob/master/dist/sprestlib.js#L782. I'd be willing to do a PR for this issue. @gitbrent, is the repo being developed in the /dist folder?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants