Passport strategy for authenticating with Outlook.com (Windows Live) accounts using the Outlook REST API v2 and OAuth 2.0. Current stable version is 3.0.0, which drops support for Node <10. This package authenticates against the official Microsoft v2 endpoints, differentiating it from older modules that target v1 or outdated APIs. The strategy integrates with any Connect/Express-style middleware via Passport. It supports standard OAuth2 flows and Microsoft-specific options like prompt, login_hint, and domain_hint. The profile schema was normalized in v2.0.0 to follow the Passport profile convention, so existing users need to update property access (e.g., profile.DisplayName instead of profile.name).
npm install passport-outlookNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Express app using Passport with passport-outlook for OAuth2 login via Outlook REST API v2.
Upgrade Node.js to v10 or later, or stay on v2.x if using older Node.
Update code to reference new profile field names (e.g., profile.DisplayName, profile.EmailAddress).
Use new property names as documented in v2+ README.
Use import syntax for ESM or const OutlookStrategy = require('passport-outlook').default; for legacy CommonJS.Check the verify callback signature: (req, accessToken, refreshToken, profile, done) instead of (accessToken, refreshToken, profile, done).
Use: import OutlookStrategy from 'passport-outlook'; or const OutlookStrategy = require('passport-outlook').default;Ensure passport.use(new OutlookStrategy(...)) is called before passport.authenticate('outlook').Provide a valid callbackURL in the strategy constructor (must match Microsoft App Registration setting).
Use profile.id, profile.DisplayName, profile.EmailAddress as per v2+ schema.