node-sp-auth-config
🔧 Config options builder for node-sp-auth (SharePoint Authentication in Node.js)
node-sp-auth-config
provides wizard-like approach for building and managing config files for node-sp-auth (Node.js to SharePoint unattended http authentication). Includes CLI for generating config files from command prompt.
Versions supported:
SharePoint Online
SharePoint On-Prem (2019, 2016, 2013)
SharePoint On-Prem 2010
Authentication options:
SharePoint Online:
User credentials (SAML/ADFS)
Add-In Only permissions
On-Demand authentication (using Electron popup)
SharePoint 2019, 2016, 2013:
User credentials (NTLM, NTLM v2)
ADFS user credentials
Form-based authentication (FBA)
Form-based authentication (Forefront TMG)
Add-In Only permissions
On-Demand authentication (using Electron popup)
SharePoint 2010:
User credentials (NTLM, NTMLv2)
Form-based authentication (FBA)
Form-based authentication (Forefront TMG)
Config layer and auth supports Office 365 Dedicated (SPO on custom domain) as well.
How to use
Install
or install globally to use as CLI:
Usage as CLI
Usage in TypeScript
Usage in JavaScript
Initiation parameters
Production runtime
Headless mode
When using in a headless mode, in case of missing parameters, one can expect non-interactive behavior with no prompts but graceful exit with corresponding error output.
This can be achieved by providing headlessMode
settings property is equal to true
.
The headless mode also automatically configured when NODE_ENV
(or SPAUTH_ENV
) environment variable is equal to production
.
Environment variables
All the parameters which are usually stored in private.json
can be defined also using environment variables. Environment variables started with SPAUTH_
prefix are recognized with the library. Second part of the name is an actual name of the node-sp-auth
credentials property yet in uppercase (e.g. SPAUTH_SITEURL
, SPAUTH_USERNAME
, SPAUTH_PASSWORD
).
Along with credentials props these service variables are used:
Configuring CI/CD
Checkout this end-to-end sample.
License
Last updated