Gathering detailed insights and metrics for @azure/msal-browser
Gathering detailed insights and metrics for @azure/msal-browser
Gathering detailed insights and metrics for @azure/msal-browser
Gathering detailed insights and metrics for @azure/msal-browser
msal-community-solid
A Solid.js SPA library for the Microsoft Identity Platform implemented as a wrapper around @azure/msal-browser.
@intility/cypress-msal
A cypress plugin for projects using @azure/msal-browser.
validate-azure-ad-token
Function to validate access token received from azure active directory. Useful when you're using a msal library to authenticate users on the frontend and you wanna verify Microsoft tokens in the API.
@intility/react-msal-browser
React package with bindings for simplifying athentication against Intility ADFS and Azure AD.
Microsoft Authentication Library (MSAL) for JS
npm install @azure/msal-browser
Typescript
Module System
Min. Node Version
Node Version
NPM Version
@azure/msal-angular v4.0.15
Updated on Jul 08, 2025
@azure/msal-react v3.0.15
Updated on Jul 08, 2025
@azure/msal-common v15.8.1
Updated on Jul 08, 2025
@azure/msal-browser v4.15.0
Updated on Jul 08, 2025
@azure/msal-node-extensions v1.5.17
Updated on Jul 08, 2025
@azure/msal-node v3.6.3
Updated on Jul 08, 2025
TypeScript (98.73%)
JavaScript (1.1%)
C++ (0.08%)
PowerShell (0.05%)
HTML (0.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3,900 Stars
13,455 Commits
2,694 Forks
124 Watchers
192 Branches
1,162 Contributors
Updated on Jul 12, 2025
Latest Version
4.15.0
Package Id
@azure/msal-browser@4.15.0
Unpacked Size
10.52 MB
Size
1.55 MB
File Count
2,340
NPM Version
10.8.2
Node Version
18.20.6
Published on
Jul 08, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
29
Getting Started | AAD Docs | Library Reference |
---|
The MSAL library for JavaScript enables client-side JavaScript 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 @azure/msal-browser
package described by the code in this folder uses the @azure/msal-common
package as a dependency to enable authentication in JavaScript Single-Page Applications without backend servers. This version of the library uses the OAuth 2.0 Authorization Code Flow with PKCE. To read more about this protocol, as well as the differences between implicit flow and authorization code flow, see the section below.
This is an improvement upon the previous @azure/msal
library which will utilize the authorization code flow in the browser. Most features available in the old library will be available in this one, but there are nuances to the authentication flow in both. The @azure/msal-browser
package does NOT support the implicit flow.
See here.
See here.
@azure/msal-browser
is meant to be used in Single-Page Application scenarios.
Before using @azure/msal-browser
you will need to register a Single Page Application in Azure AD to get a valid clientId
for configuration, and to register the routes that your app will accept redirect traffic on.
1npm install @azure/msal-browser
The msal-browser-samples
folder contains sample applications for our libraries.
More instructions to run the samples can be found in the README.md
file of the VanillaJSTestApp2.0 folder.
More advanced samples backed with a tutorial can be found in the Azure Samples space on GitHub:
We also provide samples for addin/plugin scenarios:
See the contributing.md
file for more information.
To build the @azure/msal-browser
library, you can do the following:
1// Change to the msal-browser package directory 2cd lib/msal-browser/ 3// To run build only for browser package 4npm run build
To build both the @azure/msal-browser
library and @azure/msal-common
libraries, you can do the following:
1// Change to the msal-browser package directory 2cd lib/msal-browser/ 3// To run build for both browser and common packages 4npm run build:all
@azure/msal-browser
uses jest to run unit tests.
1// To run tests 2npm test 3// To run tests with code coverage 4npm run test:coverage
If you are using a framework such as Angular or React you may be interested in using one of our wrapper libraries:
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 23 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 21/23 approved changesets -- score normalized to 9
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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