This repository contains the Microsoft Authentication Library for JavaScript (MSAL.js), a comprehensive authentication solution that enables JavaScript applications to authenticate users with Microsoft Identity Platform. The repository supports work and school accounts (Azure AD), personal Microsoft accounts (MSA), and social identity providers through Azure AD B2C.
lib/: core librariesextensions/: additional librariessamples/: example applications and end-to-end testsshared-configs/: shared ESLint and Rollup configurationsshared-test-utils/: common test utilitiesregression-tests/: performance benchmarkschange/: Beachball change files
Each package within lib/ and extensions/ is organized as follows:
src/: TypeScript source codetest/: unit and integration testsdocs/: documentationapiReview/: API extractor files
Some samples located in the samples/ directory contain a test/ folder. End to End tests for the packages are located here.
- msal-common: Core package - no dependencies on other MSAL packages
- msal-browser: Depends on msal-common
- msal-node: Depends on msal-common
- msal-react: Depends on msal-browser
- msal-angular: Depends on msal-browser
- msal-node-extensions: Depends on msal-common
CRITICAL: Always build dependencies in correct order. msal-common must be built before msal-browser/msal-node. msal-browser must be built before msal-react/msal-angular.
- Always run
npm installat repository root to bootstrap the monorepo - Repository uses npm workspaces - dependencies are shared and managed at root level
When a commit deletes, renames, or moves files and directories (especially samples), scan .md files for references to the affected paths only — do not audit unrelated links. Look for:
- Relative links (
./path/to/file) - GitHub URLs (
github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/...) - Anchor references (
#heading-name) if headings were changed
Update or remove stale links introduced or exposed by the current change before merging. For a full repo-wide audit, use the /doc-audit prompt (.github/prompts/doc-audit.prompt.md). Follow guidelines listed at .github/instructions/doc_links.instructions.md.