Skip to content

Add MSAL native broker support for Windows ARM64 and Linux RHEL#324803

Draft
TylerLeonhardt wants to merge 1 commit into
mainfrom
dev/tyleonha/msal-broker-win-arm64-rhel
Draft

Add MSAL native broker support for Windows ARM64 and Linux RHEL#324803
TylerLeonhardt wants to merge 1 commit into
mainfrom
dev/tyleonha/msal-broker-win-arm64-rhel

Conversation

@TylerLeonhardt

Copy link
Copy Markdown
Member

What

Expands MSAL native broker support (@azure/msal-node-extensions / @azure/msal-node-runtime) to Windows ARM64 and Linux RHEL, on top of the existing Windows x64/x86, macOS x64/arm64, and Linux (Ubuntu) x64.

How

  • Bump @azure/msal-node-runtime to 0.20.5 (via overrides). This is the first version that ships Windows arm64 + RHEL/Ubuntu Linux binaries; it also fixes the arm64 macOS dylib that 0.20.4 shipped linked for the wrong architecture (82 KB instead of ~7 MB). The runtime's JS/ABI surface is unchanged from 0.20.1, so @azure/msal-node / @azure/msal-node-extensions are untouched.
  • extensions/microsoft-authentication/esbuild.mts: enable Windows arm64. For Windows/macOS, copy the specific target-arch binaries out of the package's dist/<platform>/<arch>/ (the target arch can differ from the build host in cross-arch/universal builds). For Linux, use the package as-is — MSAL's own install script (copyBinaries.js) already selects the correct distro binary from /etc/os-release and flattens it, so the extension just copies the flattened binaries.
  • build/darwin: 0.20.5 renames the macOS dylibs to arch-suffixed names (libmsalruntime_{x64,arm64}.dylib). Handle that in the universal-app merge (cross-copy each dylib into both builds + x64ArchFiles) and in Mach-O arch verification, mirroring the existing copilot/ripgrep single-arch-binary pattern.
  • test/sanity: exclude msalruntime_arm64.dll from the Windows ProductName VersionInfo check.

Testing

  • Windows ARM64 (validated on an arm64 machine): the extension build places genuine arm64 binaries in dist/ (msal-node-runtime.node + msalruntime_arm64.dll, PE machine type 0xAA64), and the native broker loads and initializes in an arm64 process (NativeBrokerPlugin().isBrokerAvailable === true). Interactive Microsoft sign-in uses the native OS broker.
  • ⚠️ macOS universal: not validated (change authored on Windows). The darwin-universal packaging + verify-macho steps should be exercised on a Mac before merge.
  • ⚠️ Linux RHEL: the binary that ships is whichever distro the release build machine produces (MSAL's own selection). Delivering the RHEL binary to RHEL users requires building the .rpm on a RHEL host — a build-infra follow-up, not covered here.

Draft while the macOS universal build and Linux RHEL packaging are validated in CI.

🤖 Generated with Claude Code

Bump @azure/msal-node-runtime to 0.20.5, which ships Windows arm64 and
RHEL/Ubuntu Linux broker binaries (and fixes the arm64 macOS dylib that
0.20.4 shipped linked for the wrong architecture).

- esbuild.mts: enable Windows arm64; copy the specific target-arch
  binaries for Windows/macOS, and use the package's own flattened Linux
  binary (selected at install time by msal-node-runtime's copyBinaries.js
  from /etc/os-release) rather than reimplementing distro detection.
- build/darwin: handle the renamed arch-suffixed macOS dylibs
  (libmsalruntime_{x64,arm64}.dylib) in the universal-app merge
  (cross-copy + x64ArchFiles) and Mach-O arch verification.
- test/sanity: exclude msalruntime_arm64.dll from the VersionInfo check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 7, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the microsoft-authentication extension’s MSAL native broker runtime packaging to support Windows ARM64 and Linux RHEL by updating the pinned MSAL runtime version and adjusting build/packaging scripts (including macOS universal-app handling for newly arch-suffixed dylibs).

Changes:

  • Pin @azure/msal-node-runtime to 0.20.5 via overrides, and update the extension lockfile accordingly.
  • Update the extension build script to copy MSAL native binaries correctly for Windows ARM64 and distro-flattened Linux binaries.
  • Update macOS universal packaging and Mach-O verification skip lists to account for libmsalruntime_{x64,arm64}.dylib.
Show a summary per file
File Description
test/sanity/src/context.ts Excludes the new msalruntime_arm64.dll from the Windows VersionInfo sanity check.
extensions/microsoft-authentication/package.json Pins @azure/msal-node-runtime to 0.20.5 via overrides.
extensions/microsoft-authentication/package-lock.json Updates the resolved @azure/msal-node-runtime version to 0.20.5.
extensions/microsoft-authentication/esbuild.mts Copies per-arch MSAL binaries on Windows/macOS and flattened binaries on Linux.
build/darwin/verify-macho.ts Skips the new arch-suffixed MSAL dylibs during universal Mach-O validation.
build/darwin/create-universal-app.ts Cross-copies arch-suffixed MSAL dylibs to satisfy universal merger file-tree requirements.

Review details

Files not reviewed (1)
  • extensions/microsoft-authentication/package-lock.json: Generated file
  • Files reviewed: 5/6 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +26 to +27
// MSAL runtime dylibs are arch-suffixed and intentionally shipped as single-arch files in the
// universal app (see create-universal-app.ts), so exclude them from the universal arch check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants