Gathering detailed insights and metrics for @azure/msal-node
Gathering detailed insights and metrics for @azure/msal-node
Gathering detailed insights and metrics for @azure/msal-node
Gathering detailed insights and metrics for @azure/msal-node
@azure/msal-node-extensions
 
@azure/msal-node-runtime
Add-on for msal-node which enables token acquisition from native broker
@intility/cypress-msal
A cypress plugin for projects using @azure/msal-browser.
@intility/msal-keyvault-cache
A cache for @azure/msal-node that uses Azure KeyVault as a store.
Microsoft Authentication Library (MSAL) for JS
npm install @azure/msal-node
Typescript
Module System
Min. Node Version
Node Version
NPM Version
95.6
Supply Chain
99.6
Quality
95
Maintenance
100
Vulnerability
98.6
License
@azure/msal-node-extensions v1.5.16
Updated on Jul 01, 2025
@azure/msal-react v3.0.14
Updated on Jul 01, 2025
@azure/msal-angular v4.0.14
Updated on Jul 01, 2025
@azure/msal-node v3.6.2
Updated on Jul 01, 2025
@azure/msal-browser v4.14.0
Updated on Jul 01, 2025
@azure/msal-common v15.8.0
Updated on Jul 01, 2025
TypeScript (98.73%)
JavaScript (1.1%)
C++ (0.08%)
PowerShell (0.05%)
HTML (0.04%)
Total Downloads
358,514,495
Last Day
280,014
Last Week
4,088,489
Last Month
16,775,438
Last Year
174,057,718
MIT License
3,894 Stars
13,451 Commits
2,695 Forks
124 Watchers
187 Branches
1,161 Contributors
Updated on Jul 06, 2025
Minified
Minified + Gzipped
Latest Version
3.6.2
Package Id
@azure/msal-node@3.6.2
Unpacked Size
2.30 MB
Size
414.45 kB
File Count
440
NPM Version
10.8.2
Node Version
18.20.6
Published on
Jul 01, 2025
Cumulative downloads
Total Downloads
Last Day
51.9%
280,014
Compared to previous day
Last Week
0.1%
4,088,489
Compared to previous week
Last Month
-1.4%
16,775,438
Compared to previous month
Last Year
66.3%
174,057,718
Compared to previous year
Getting Started | AAD Docs | Library Reference |
---|
MSAL Node enables applications to authenticate users using Azure AD work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through Azure AD B2C service. It also enables your app to get tokens to access Microsoft Cloud services such as Microsoft Graph.
The current version supports the following ways of acquiring tokens:
Note that the username and password flow is deprecated and support will be removed in a future release.
More details on different grant types supported by Microsoft authentication libraries in general can be found here.
The scenarios supported with this library are:
More details on scenarios and the authentication flows that map to each of them can be found here.
See here.
Before using @azure/msal-node
you will need to register your app in the azure portal:
1npm install @azure/msal-node
MSAL Node will follow the Long Term Support (LTS) schedule of the Node.js project. Our support plan is as follows.
Any major MSAL Node release:
MSAL Node version | MSAL support status | Supported Node versions |
---|---|---|
3.x.x | Active development | 16, 18, 20, 22, 24 |
2.x.x | Active development | 16, 18, 20, 22 |
1.x.x | In maintenance | 10, 12, 14, 16, 18 |
Note: There have been no functional changes in the MSAL Node v2 release.
There are multiple samples included in the repository that use MSAL Node to acquire tokens. These samples are currently used for manual testing, and are not meant to be a reference of best practices, therefore use judgement and do not blindly copy this code to any production applications.
AAD samples:
enableSpaAuthorizationCode
to perform SSO for applications that leverage server-side and client-side authentication using MSAL Browser and MSAL Node.B2C samples:
Others:
1// Install dependencies from root of repo 2npm install 3 4// Change to the msal-node package directory 5cd lib/msal-node 6 7// To run build for common package & node package 8npm run build:all 9 10// To run build only for node package 11npm run build 12 13// To run tests 14npm run test
Below is a list of commands you will probably find useful:
npm run build:modules:watch
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab. The library will be rebuilt if you make edits.
npm run build
Bundles the package to the dist
folder.
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
npm run build:all
Builds both msal-common
and msal-node
npm run lint
Runs eslint with Prettier
npm test
, npm run test:coverage
, npm run test:watch
Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit. Generate code coverage by adding the flag --coverage. No additional setup needed. Jest can collect code coverage information from entire projects, including untested files.
If you find a security issue with our libraries or services please report it to secure@microsoft.com with as much detail as possible. Your submission may be eligible for a bounty through the Microsoft Bounty program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting this page and subscribing to Security Advisory Alerts.
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
5.5/10
Summary
Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability
Affected Versions
>= 2.7.0, < 2.9.2
Patched Versions
2.9.2
Reason
30 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 21/25 approved changesets -- score normalized to 8
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
27 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More