Skip to content

Additional msal-react v5 migration details#8386

Merged
tnorling merged 4 commits intodevfrom
migration-guide-updates
Mar 9, 2026
Merged

Additional msal-react v5 migration details#8386
tnorling merged 4 commits intodevfrom
migration-guide-updates

Conversation

@tnorling
Copy link
Copy Markdown
Collaborator

@tnorling tnorling commented Mar 6, 2026

This pull request updates the migration documentation for both MSAL Browser and MSAL React to clarify the required steps for upgrading to v5, including payload type changes, migration paths, and compatibility notes. The changes provide explicit migration examples and highlight new requirements and breaking changes.

MSAL React v5 Migration Guidance and Compatibility:

  • Added clear migration paths for upgrading from v1/v2/v3 to v5, with emphasis on following the MSAL Browser v4-v5 migration guide and setting up the required COOP redirect bridge.
  • Documented React version support: MSAL React v5 now requires React 19+, with notes and workarounds for temporary use on React 18, though it is not supported.

MSAL Browser v5 Event Handling Changes:

  • Provided explicit guidance on handling the new LOGIN_SUCCESS payload type, including before/after TypeScript code samples to illustrate the migration from casting to AuthenticationResult to using AccountInfo.

InteractionStatus and Event Consolidation:

  • Clarified the consolidation of InteractionStatus values and provided a migration example for simplifying in-progress status checks in React apps.

These updates ensure developers have clear, actionable steps for migrating to the latest major versions and handling breaking changes in event payloads and interaction status.

@tnorling tnorling requested a review from a team as a code owner March 6, 2026 22:17
Copilot AI review requested due to automatic review settings March 6, 2026 22:17
peterzenz
peterzenz previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the migration documentation for MSAL Browser (v4-migration.md) and MSAL React (migration-guide-v4-v5.md) to clarify the upgrade path to v5, providing explicit code examples and compatibility notes for developers.

Changes:

  • Added migration path guidance (v1/v2/v3 → v5), COOP redirect bridge setup instructions, React 18 compatibility notes, and an InteractionStatus code migration example to the msal-react v4-v5 migration guide.
  • Added a LOGIN_SUCCESS payload type migration section with before/after TypeScript code samples to the msal-browser v4-migration guide.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
lib/msal-react/docs/migration-guide-v4-v5.md Adds migration paths, COOP bridge section, React 18 workaround note, and InteractionStatus code migration example
lib/msal-browser/docs/v4-migration.md Adds LOGIN_SUCCESS payload type migration section with before/after TypeScript code examples

Comment thread lib/msal-react/docs/migration-guide-v4-v5.md Outdated
Comment thread lib/msal-browser/docs/v4-migration.md Outdated
Comment thread lib/msal-browser/docs/v4-migration.md
Comment thread lib/msal-react/docs/migration-guide-v4-v5.md
Comment thread lib/msal-react/docs/migration-guide-v4-v5.md Outdated
lalimasharda
lalimasharda previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

@tnorling I've opened a new pull request, #8387, to work on those changes. Once the pull request is ready, I'll request review from you.

…8387)

The migration guide stated "React 19 or greater" but the actual peer
dependency is `"react": "^19.2.1"`, meaning React 19.0.x and 19.1.x do
**not** satisfy the constraint.

## Changes

- **`lib/msal-react/docs/migration-guide-v4-v5.md`**: Replace both
occurrences of "React 19 or greater" / "19+" with "React 19.2.1 or
greater" to match the declared peer dependency.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tnorling <5307810+tnorling@users.noreply.github.com>
@tnorling tnorling dismissed stale reviews from lalimasharda and peterzenz via 044b0f9 March 6, 2026 23:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

## COOP redirect bridge setup (required)

MSAL Browser v5 requires a dedicated redirect page/bridge for authentication flows.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

may be worth double-checking for scope/wording so it doesn’t read more universally than intended?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a universal requirement

@tnorling tnorling enabled auto-merge (squash) March 9, 2026 17:08
@tnorling tnorling merged commit b3d4888 into dev Mar 9, 2026
7 checks passed
@tnorling tnorling deleted the migration-guide-updates branch March 9, 2026 18:29
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.

7 participants