Microsoft Authentication Library (MSAL) for JS
Installations
npm install @azure/msal-common
Releases
@azure/msal-node-extensions v1.5.0
Published on 19 Nov 2024
@azure/msal-node v2.16.2
Published on 19 Nov 2024
@azure/msal-node v2.16.1
Published on 12 Nov 2024
@azure/msal-node-extensions v1.4.0
Published on 05 Nov 2024
@azure/msal-angular v3.1.0
Published on 05 Nov 2024
@azure/msal-react v2.2.0
Published on 05 Nov 2024
Developer
Developer Guide
Module System
ESM
Min. Node Version
>=0.8.0
Typescript Support
Yes
Node Version
20.18.0
NPM Version
10.8.2
Statistics
3,685 Stars
13,286 Commits
2,648 Forks
125 Watching
244 Branches
1,180 Contributors
Updated on 28 Nov 2024
Bundle Size
143.93 kB
Minified
36.67 kB
Minified + Gzipped
Languages
TypeScript (98.65%)
JavaScript (1.14%)
C++ (0.1%)
PowerShell (0.06%)
HTML (0.05%)
C (0.01%)
Total Downloads
Cumulative downloads
Total Downloads
484,008,224
Last day
-3.5%
876,450
Compared to previous day
Last week
0.6%
4,987,928
Compared to previous week
Last month
0.6%
21,300,140
Compared to previous month
Last year
26.6%
225,993,258
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
26
Microsoft Authentication Library for JavaScript (MSAL.js)
The Microsoft Authentication Library for JavaScript enables both client-side and server-side JavaScript applications to authenticate users using Azure AD for 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.
Repository
Core, wrapper and extensions libraries
The lib
folder contains the source code for our libraries in active development. You will also find all the details about installing the libraries in their respective README.md.
-
Microsoft Authentication Library for Node.js: A Node.js library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the following OAuth 2.0 protocols and is OpenID-compliant:
-
Microsoft Authentication Library for JavaScript: A browser-based, framework-agnostic browser library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the OAuth 2.0 Authorization Code Flow with PKCE, and is OpenID-compliant.
-
Microsoft Authentication Library for React: A wrapper of the msal-browser library for apps using React.
-
Microsoft Authentication Library for Angular: A wrapper of the msal-browser library for apps using Angular framework.
-
Microsoft Authentication Extensions for Node: The Microsoft Authentication Extensions for Node offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Node (MSAL).
Libraries in Long-term Support (LTS)
The following libraries, hosted on the msal-lts
branch, are no longer in active development, but they are still receiving critical security bug fix support.
- Microsoft Authentication Library for JavaScript v2.x
- Microsoft Authentication Library for Node.js v1.x
- Microsoft Authentication Library for React v1.x
- Microsoft Authentication Library for Angular v2.x
Package Structure
We ship a number of different packages which are meant for different platforms. You can see the relationship between packages and different authentication flows they implement below.
Samples
The samples
folder contains sample applications for our libraries. A complete list of samples can be found in the respective package folders or on our wiki.
Package versioning
All of our libraries follow semantic versioning. We recommend using the latest version of each library to ensure you have the latest security patches and bug fixes.
Roadmap
Please check the roadmap to see what we are working on and what we have planned for future releases.
Community Help and Support
-
GitHub Issues is the best place to ask questions, report bugs, and new request features.
-
FAQs for access to our frequently asked questions.
-
Stack Overflow using "msal" and "msal.js" tag.
Contribute
We enthusiastically welcome contributions and feedback. Please read the contributing guide before you begin.
Security Reporting
If you find a security issue with our libraries or services please report it to the Microsoft Security Response Center (MSRC) 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.
License
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License").
We Value and Adhere to the Microsoft Open Source Code of Conduct
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
Found 23/28 approved changesets -- score normalized to 8
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'allow deletion' disabled on branch 'dev'
- Info: 'force pushes' disabled on branch 'dev'
- Warn: 'branch protection settings apply to administrators' is disabled on branch 'dev'
- Warn: 'stale review dismissal' is disabled on branch 'dev'
- Info: required approving review count is 2 on branch 'dev'
- Info: codeowner review is required on branch 'dev'
- Warn: 'last push approval' is disabled on branch 'dev'
- Info: 'up-to-date branches' is required to merge on branch 'dev'
- Info: status check found to merge onto on branch 'dev'
- Info: PRs are required in order to make changes on branch 'dev'
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beachball-bump.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-bump.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beachball-bump.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-bump.yml/dev?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/beachball-bump.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-bump.yml/dev?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/beachball-check.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-check.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beachball-check.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-check.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beachball-check.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/beachball-check.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/client-credential-benchmark.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/client-credential-benchmark.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/client-credential-benchmark.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/client-credential-benchmark.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/client-credential-benchmark.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/client-credential-benchmark.yml/dev?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/client-credential-benchmark.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/client-credential-benchmark.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/issue-template-bot.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/issue-template-bot.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/label.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/label.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/metadata-check.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/metadata-check.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/metadata-check.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/metadata-check.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/msal-node-confidential-client-benchmarks.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/msal-node-confidential-client-benchmarks.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/msal-node-confidential-client-benchmarks.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/msal-node-confidential-client-benchmarks.yml/dev?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/msal-node-confidential-client-benchmarks.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/msal-node-confidential-client-benchmarks.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-audit.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/npm-audit.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-audit.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/npm-audit.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/typedoc.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/typedoc.yml/dev?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/typedoc.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/typedoc.yml/dev?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/typedoc.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/AzureAD/microsoft-authentication-library-for-js/typedoc.yml/dev?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/client-credential-benchmark.yml:27
- Warn: npmCommand not pinned by hash: .github/workflows/msal-node-confidential-client-benchmarks.yml:22
- Info: 0 out of 17 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 5 third-party GitHubAction dependencies pinned
- Info: 4 out of 6 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/beachball-bump.yml:20
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/beachball-check.yml:20
- Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/beachball-check.yml:21
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/issue-template-bot.yml:12
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/label.yml:22
- Info: topLevel 'contents' permission set to 'read': .github/workflows/beachball-bump.yml:15
- Info: topLevel 'contents' permission set to 'read': .github/workflows/beachball-check.yml:15
- Warn: no topLevel permission defined: .github/workflows/client-credential-benchmark.yml:1
- Info: found token with 'none' permissions: .github/workflows/issue-template-bot.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/label.yml:17
- Warn: no topLevel permission defined: .github/workflows/metadata-check.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/msal-node-confidential-client-benchmarks.yml:11
- Warn: topLevel 'deployments' permission set to 'write': .github/workflows/msal-node-confidential-client-benchmarks.yml:9
- Info: topLevel 'contents' permission set to 'read': .github/workflows/npm-audit.yml:24
- Warn: no topLevel permission defined: .github/workflows/typedoc.yml:1
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 26 are checked with a SAST tool
Reason
17 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-m5vv-6r4h-3vj9
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: MAL-2022-2692
- Warn: Project is vulnerable to: GHSA-mpg4-rc92-vx8v
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986 / GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
5.4
/10
Last Scanned on 2024-11-25
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