Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including sharepoint-apponly-node with all npm packages installed. Try it out:

var sharepointApponlyNode = require("sharepoint-apponly-node")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sharepoint-apponly-node v1.0.5

This package helps you to get apponly token for sharepoint context


access SharePoint using client credentials "apponly" from nodejs applications
run npm install sharepoint-apponly-node --save

  1. Require the sharepoint-apponly module
    var sharepoint=require('sharepoint-apponly-node');
  2. Execute call to getSharePointAppOnlyAccessToken and get the token response body in the callback sharepoint.getSharePointAppOnlyAccessToken('', 'YourClientId','YourClientSecret',function(response){ console.log(response); });
    the result will be something like Client Credentials Token Response
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free