sharepoint-adfs is a Node.js library for ADFS claims authentication
npm install sharepoint-adfssharepoint-adfs
===============
Are you looking to retrieve SAML token/FedAuth Cookie from SharePoint? Then this is the right package for you.
Description
===========
If your SharePoint site is configured for SAML based ADFS authentication, it helps you to retrieve SAML token
and FedAuth cookie.
Supports only SharePoint OnPremises and not SharePoint online.
Installation
============
npm install sharepoint-adfs --save
Usage
=====
Its easy to use. Just import this package in your code, provide necessary inputs to options variable and call required methods.
``javascript
var sharepoint-adfs = require('sharepoint-adfs');
var options = {
"wa": "wsignin1.0",
"wtrealm": "urn:
"wctx": "https://
"UserName": "
"Password": "Password",
"AuthMethod": "FormsAuthentication",
"adfsServerUrl": "https://
"RelyingPartyID": "
};
`
Get the SAML token or FedAuth Cookie using below functions
`javascript`
var token = sharepointAuth.getSAMLToken(options);
var FedAuthCookie = sharepointAuth.getFedAuthCookie(options);
Call Sharepoint rest
--------------------
Now you can call Sharepoint REST APIs. Just pass the FedAuth cookie in headers and
give a call to REST URL using request.get
`javascript``
var headers = {
"Accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"Cookie": FedAuthCookie
};
request.get("https://mySharePointSite.com/_api/lists/getByTitle('
console.log(response);
});
Getting support
===============
If you face any problems you can mail me Amol.Eklare111@gmail.com. Before doing that, please read this
file carefully.