Registry / http-networking / proactive-sharepoint-auth

proactive-sharepoint-auth

JSON →
library0.1.0jsnpmunverified

A lightweight Node.js library for authenticating against SharePoint Online and retrieving authentication cookies. Version 0.1.0 is the current stable release. It uses device-level credentials (username/password) to obtain a FedAuth cookie that can be used for subsequent SharePoint API calls. The library is minimal, with no external dependencies, but relies on the deprecated SPO login flow. It only supports username-password authentication (no MFA or app-only). Released irregularly, with no updates since initial version.

npm install proactive-sharepoint-auth
INSTALL
IMPORT
SIG · PROACTIVE-SHAREPOI
P
proactive-sharepoint-auth
http-networkingjavascriptv0.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SharePoint.Authenticate
✓ const proactive = require('proactive-sharepoint-auth'); new proactive.SharePoint.Authenticate(...)
✗ import { SharepointAuthenticate } from 'proactive-sharepoint-auth'
The package does not provide ES module exports. Use CommonJS require. The class is nested under `SharePoint` property.
SharePoint.Authenticate
✓ import * as proactive from 'proactive-sharepoint-auth'; new proactive.SharePoint.Authenticate(...)
✗ import { SharePoint } from 'proactive-sharepoint-auth'
Even in TypeScript with ESM, you must use namespace import because the module exports via module.exports, not named exports.
SharePoint.Authenticate
✓ const { SharePoint } = require('proactive-sharepoint-auth'); new SharePoint.Authenticate(...)
✗ const auth = require('proactive-sharepoint-auth'); new auth.Authenticate(...)
The exported object has a 'SharePoint' property containing the Authenticate class.

Authenticates against SharePoint Online and logs the FedAuth cookie.

const proactive = require('proactive-sharepoint-auth'); const auth = new proactive.SharePoint.Authenticate( 'https://yourtenant.sharepoint.com', 'user@tenant.onmicrosoft.com', 'your-password' ); auth.authenticate() .then(cookie => { console.log('Authentication cookie:', cookie); // Use cookie for SharePoint API calls }) .catch(err => { console.error('Authentication failed:', err); });
Debug
Known issues
breakingIn version 0.0.1, the API was proactive.SharePoint.Authenticate instead of proactive.SharePoint.Authenticate (capitalization). Mistaking the casing will cause a runtime error.
fix
Ensure correct casing: proactive.SharePoint.Authenticate
affects: >=0.0.1
deprecatedUsername-password authentication for SharePoint Online is deprecated by Microsoft and may stop working. Use OAuth 2.0 app-only or delegated authentication instead.
fix
Migrate to @pnp/nodejs or msal-node with proper OAuth 2.0 flows.
affects: >=0.1.0
gotchaThe authenticate() method returns a cookie string, not an object. Ensure you handle it as a plain string when using in HTTP headers.
fix
Set the cookie header as 'Cookie: FedAuth=' + cookie instead of JSON.stringify(cookie).
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: proactive.SharePoint is undefined
Incorrect import or misspelling of the namespace.
fix
Use correct require: const proactive = require('proactive-sharepoint-auth'); and access proactive.SharePoint.Authenticate.
Cannot find module 'proactive-sharepoint-auth'
Package not installed or not in node_modules.
fix
Run npm install proactive-sharepoint-auth --save
Request failed with status code 403
Authentication credentials are incorrect or MFA is required.
fix
Verify username/password. For MFA-enabled accounts, use an alternative auth method (e.g., app-only).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources
proactive-sharepoint-auth — npm install proactive-sharepoint-auth · libregistry