Is it possible to use https://github.com/pnp/pnpjs with on-premise SharePoint with an external NodeJS application? Installing web parts is not an option I must perform read-only access.

If so, what versions of SharePoint are supported?


It is indeed possible to use PnP JS with SP OnPremise.

It supports both 2013 and 2016 as well as the upcoming 2019 environment. Under the hood, it is just a wrapper over the existing REST API endpoints.

Reference - Getting started with PnP JS

  • All the auth examples seem to rely on clientID/clientSecret. but sharepoint on prem is all NTLM based. is there any examples of PnPJS with Windows Authentication? This is a remote nodeJS application in my case – Nicholas DiPiazza Aug 1 '18 at 2:51
  • I found a httpntlm in the pnpjs packages.json but i don't seem to see it used anywhere – Nicholas DiPiazza Aug 1 '18 at 3:05
  • Just drop this file in a script editor webpart and it will start working – Gautam Sheth Aug 1 '18 at 5:09
  • Totally remote situation here. I have no access to install web parts. I am writing a purely standalone nodejs application running on linux. I would use CSOM but licensing currently prohibits CSOM on linux. Instead of using the Pnp-JS application I think I'll just extract the REST api calls from the source code and use Java with HTTP client calls. – Nicholas DiPiazza Aug 1 '18 at 6:00
  • I'm on linux so the whole typescript thing is killing my abilities here. i gave up and am just going to use a java with http client to rest apis :( – Nicholas DiPiazza Aug 1 '18 at 17:01

You can easily use PnPjs from nodejs application. However, you need a library, which wraps authentication. Check out sp-pnp-node library, which adds authentication support for pnpjs via node-sp-auth. NTLM (both V2 and V1) is supported.

  • i gave up completely. it was too non-trivial and undocumented. – Nicholas DiPiazza Aug 31 '18 at 18:15

This is the repo you want:


It allows you to pass in auth info to the clientFactory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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