@azure/msal-node-runtime

中文文档
0.20.7发布于 2026/10/24MITTypeScriptESM + CJS零依赖近 30 天下载 160.7万

Add-on for msal-node which enables token acquisition from native broker

原始使用文档
文档目录8 节
  1. Changelog
  2. [0.20.6]
  3. [0.20.5]
  4. [0.20.4]
  5. [0.20.1]
  6. [0.20.0]
  7. [0.19.5]
  8. [0.19.4]

Microsoft Authentication Library - Node Runtime Interop (msal-node-runtime)

This package is not intended or supported for direct use, please refer to msal-node and msal-node-extensions to add authentication to your Node.js app.

Changelog

[0.20.6]

Bug Fixes

  • Fix a race condition caused by concurrent silent sign-in and/or token acquisition calls where an account could be incorrectly recognized as a duplicate during caching. Accounts previously affected by this issue are automatically recovered.

Internal

  • Load the native addon directly from its platform/arch-specific folder under dist/ instead of copying it to the package root on install. Removes the copyBinaries.js install script, allowing ignore-scripts=true for supply-chain hardening.

[0.20.5]

Bug Fixes

  • Fix arm64 macOS native binary failing to load due to incorrect architecture.

[0.20.4]

New Platform Support

  • Add RHEL 8/9/10 support for Linux (x64).
  • Add Windows arm64 support

Known Issues

  • arm64 macOS libmsalruntime.dylib is incorrectly linked for x86_64 (82 KB instead of ~7 MB). Resolved in next release.

[0.20.1]

New Platform Support

  • Add macOS x64 support.

[0.20.0]

New Platform Support

  • Add Linux (Ubuntu 22/24) x64 support

[0.19.5]

Bug Fixes

  • Fix sign-in hang on macOS (arm64) when broker is unavailable

[0.19.4]

New Platform Support

  • Add macOS arm64 support

版本与发布记录

@azure/msal-node-runtime 共发布 15 个版本,首次发布于 2023/03/02;过去 12 个月发布了 6 个版本。

版本发布日期距今
0.20.7latest2026/10/2414 天前
0.20.62026/07/253 个月前
0.0.12026/06/264 个月前
0.20.52026/04/296 个月前
0.20.42026/04/017 个月前
0.20.12025/11/2011 个月前

关于 @azure/msal-node-runtime 的常见问题

@azure/msal-node-runtime 是什么?

Add-on for msal-node which enables token acquisition from native broker

如何安装 @azure/msal-node-runtime?

在项目目录运行 npm install @azure/msal-node-runtime,或使用 pnpm add / yarn add / bun add。

@azure/msal-node-runtime 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@azure/msal-node-runtime 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@azure/msal-node-runtime 可以商用吗?

@azure/msal-node-runtime 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@azure/msal-node-runtime 的下载量有多少?

根据 npm 官方下载统计,@azure/msal-node-runtime 在 2026/10/08 – 2026/11/06 这 30 天内被下载 1,607,336 次,日均约 53,578 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@azure/msal-node-runtime 还在维护吗?

最新版本 0.20.7 发布于 2026/10/24(14 天前);至今共发布 15 个版本,其中过去 12 个月发布了 6 个;首次发布于 2023/03/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。