Skip to content

chore(m365): bump @azure/msal-node 3 -> 6 - #5849

Open
ToddHebebrand wants to merge 2 commits into
mainfrom
chore/deps-msal-node-6
Open

ToddHebebrand wants to merge 2 commits into
mainfrom
chore/deps-msal-node-6

Conversation

@ToddHebebrand

@ToddHebebrand ToddHebebrand commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bumps @azure/msal-node ^3.8.10 -> ^6.0.0 in apps/m365-communications-executor (there is no v4; upstream jumps 3 -> 5 -> 6).
  • No code changes needed: the executor constructs ConfidentialClientApplication with only auth.{clientId, authority, clientCertificate} and calls acquireTokenSilent/acquireTokenByCode — confirmed by grep, none of the removed/relocated surface (proxyUrl, customAgentOptions, protocolMode, acquireTokenInteractive, loopbackClient, responseMode) appears anywhere in src/.

Why

Task 1.5 from the dependency-major-upgrades plan.

Verification

pnpm --filter @breeze/m365-communications-executor up @azure/msal-node@latest   # landed ^6.0.0
pnpm install --frozen-lockfile --offline                                          # lockfile consistent

cd apps/m365-communications-executor && npx tsc --noEmit                          # clean
cd apps/m365-communications-executor && npx vitest run src/microsoft/delegatedClient   # 1 file, 12 tests passed

grep -rn "proxyUrl|customAgentOptions|protocolMode|acquireTokenInteractive|loopbackClient|responseMode" apps/m365-communications-executor/src   # 0 hits

Executor image build + boot check (step 3):

docker build -f apps/m365-communications-executor/Dockerfile -t m365-comms-test .   # succeeded

No README documents a health endpoint standalone check, so per the brief's fallback I confirmed a clean boot instead of a full health-endpoint hit (full boot needs real Azure Key Vault + Postgres DSN, not available locally):

  • docker run --rm m365-comms-test exits 1 silently (autostart path swallows the error into process.exitCode), as expected without real config.
  • Ran node -e inside the built image directly against dist/config.cjs's loadExecutorConfig(): fails with the expected, clean M365_COMMS_CLIENT_ID is required — proves the module graph (msal-node included) loads without any import/require crash.
  • Went further and directly constructed @azure/msal-node's ConfidentialClientApplication inside the built image with a dummy auth.{clientId, authority} (no cert): it resolved to @azure+msal-node@6.0.0 in node_modules/.pnpm and threw the expected ClientAuthError: invalid_client_credential — i.e. the v6 class itself loads and runs its own validation logic correctly, not just "the require didn't throw."
  • Test image removed after (docker rmi m365-comms-test).

Review round 1 (commit d87053b)

Reviewer flagged that the original pnpm up had picked up ambient lockfile drift unrelated to this task (yaml 2.9.0->2.9.1, joi 17.13.7->17.13.8, hono 4.13.7 new, compression 1.8.2 new) that the first PR body didn't disclose.

Transitive drift: narrowed by resetting pnpm-lock.yaml to origin/main and regenerating lockfile-only against this branch's package.json:

git checkout origin/main -- pnpm-lock.yaml && pnpm install --lockfile-only
git diff origin/main -- pnpm-lock.yaml | grep -E "^[-+]  '?[a-z@][^ ]*@[0-9]"

Result — scoped to exactly the bumped package and its own true dependency, nothing else:

-  '@azure/msal-common@15.17.0':
-  '@azure/msal-node@3.8.10':
+  '@azure/msal-common@16.14.0':
+  '@azure/msal-node@6.0.0':

Re-verified after narrowing: pnpm install --frozen-lockfile --offline clean, cd apps/m365-communications-executor && npx tsc --noEmit clean, npx vitest run src/microsoft/delegatedClient — 1 file, 12 tests passed.

Concerns

None. Confident in this bump — no removed surface used, clean typecheck, clean test suite, the v6 ConfidentialClientApplication was directly exercised (not just imported) inside the built container image, and the lockfile diff is now scoped to exactly this task's own packages.

🤖 Generated with Claude Code

https://claude.ai/code/session_018cms2ECUY322qubUH3PmVA

There is no v4 (v3 -> v5 -> v6 in one jump per upstream). Breaking
surface across v5/v6 (proxyUrl/customAgentOptions removal,
protocolMode relocation, native fetch, acquireTokenInteractive
default responseMode change, loopbackClient removal) does not apply:
this executor constructs ConfidentialClientApplication with only
auth.{clientId, authority, clientCertificate} and calls
acquireTokenSilent/acquireTokenByCode, confirmed by grep (no hits for
proxyUrl|customAgentOptions|protocolMode|acquireTokenInteractive|
loopbackClient|responseMode anywhere in src/).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018cms2ECUY322qubUH3PmVA
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 14, 2026

Copy link
Copy Markdown

Deploying breeze with  Cloudflare Pages  Cloudflare Pages

Latest commit: d87053b
Status: ✅  Deploy successful!
Preview URL: https://7536defe.breeze-9te.pages.dev
Branch Preview URL: https://chore-deps-msal-node-6.breeze-9te.pages.dev

View logs

The prior pnpm up picked up ambient drift unrelated to this task
(yaml, joi, hono, compression bumps/additions from whatever else had
touched the lockfile). Reset pnpm-lock.yaml to origin/main and
regenerated lockfile-only against this branch's package.json so the
diff is scoped to the actual bump: @azure/msal-node 3.8.10 -> 6.0.0
and its own dependency @azure/msal-common 15.17.0 -> 16.14.0. No
other package changed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018cms2ECUY322qubUH3PmVA
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.

1 participant