SharePoint / SharePoint/sp-dev-docs

spfxsinglesignon.aspx loads msal_browser_v4_min.js instead of msal-redirect-bridge.min.js in Edge popup flow

Open
#10,874 2 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jun 4, 2026.

area:auth sharepoint-developer-support type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

Browser: Microsoft Edge (latest stable, reproducible consistently)
Browser comparison: Reproducible in Edge, not reproducible in Chrome
SPFx version: 1.23.0
MSAL version: @azure/msal-browser 5.11.x

Describe the bug / error

After upgrading from @azure/msal-browser 3.x to 5.11.x to support SharePoint Online's newer popup authentication bridge, popup authentication works correctly in Chrome but fails in Microsoft Edge.

Authentication itself succeeds, however the popup never completes and remains on spfxsinglesignon.aspx#code=.... The parent page remains in interaction_in_progress.

If the popup is manually closed and the page refreshed, acquireTokenSilent() succeeds, indicating that authentication completed and tokens/accounts were cached successfully.

MSAL Configuration
const msalConfig = {
  auth: {
    clientId: "<client-id>",
    authority: "https://login.microsoftonline.com/<tenant-id>",
    redirectUri: "https://<tenant>.sharepoint.com/_forms/spfxsinglesignon.aspx"
  }
};

Authentication request:

await msalInstance.loginPopup({
  scopes: ["https://<tenant>.sharepoint.com/.default"],
  prompt: "select_account"
});

Reproduction steps
Open SPFx application in Edge.
Call loginPopup().
Select an account in Microsoft login page.
Authentication redirects to:
https://.sharepoint.com/_forms/spfxsinglesignon.aspx#code=...
Popup never closes.
Parent page remains in interaction_in_progress.
Expected behavior

Popup should complete authentication, notify the parent window, close automatically, and return the authentication result.

Actual behavior

Popup remains open indefinitely on:

Relevant Code Snippets
import { PublicClientApplication } from "@azure/msal-browser";

const msalInstance = new PublicClientApplication({
    auth: {
        clientId: "<client-id>",
        authority: "https://login.microsoftonline.com/<tenant-id>",
        redirectUri: "https://<tenant>.sharepoint.com/_forms/spfxsinglesignon.aspx"
    }
});

await msalInstance.initialize();

try {
    const response = await msalInstance.loginPopup({
        scopes: ["https://<tenant>.sharepoint.com/.default"],
        prompt: "select_account"
    });

    console.log(response);
} catch (error) {
    console.error(error);
}


Observed behavior in Edge:

1. Popup opens.
2. User selects account.
3. Authentication succeeds and redirects to:


https://<tenant>.sharepoint.com/_forms/spfxsinglesignon.aspx#code=...


4. Popup remains open indefinitely.
5. Parent page remains in `interaction_in_progress`.

Inside the popup after redirect:


window.opener
// null

window.name
// ""


Network requests show:


/_layouts/15/msal_browser_v4_min.js


loaded instead of:


/_layouts/15/Msal/msal-redirect-bridge.min.js


Manually executing:


dynamicLoadJs(
  '/_layouts/15/Msal/msal-redirect-bridge.min.js',
  function () {
    if (
      typeof msalRedirectBridge !== 'undefined' &&
      typeof msalRedirectBridge.broadcastResponseToMainFrame === 'function'
    ) {
      msalRedirectBridge.broadcastResponseToMainFrame();
    }
  }
);


immediately:

* closes the popup
* returns the authentication result to the parent window
* clears `interaction_in_progress`
* allows the application to continue normally

The same configuration works correctly in Chrome.

The same configuration works correctly in Chrome.`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.