From 5464b1c9bd09c4848d8835954e4596604fb62205 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:05:11 +0000 Subject: [PATCH 1/3] Initial plan From 410206ab1d418b1748ebfd904526f9240bfdc1ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:16:13 +0000 Subject: [PATCH 2/3] Add allow="local-network-access *" attribute to iframe for Chrome 142 compatibility Co-authored-by: tnorling <5307810+tnorling@users.noreply.github.com> --- .../src/interaction_handler/SilentHandler.ts | 1 + .../test/interaction_handler/SilentHandler.spec.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/msal-browser/src/interaction_handler/SilentHandler.ts b/lib/msal-browser/src/interaction_handler/SilentHandler.ts index e896e65b22..82917963e5 100644 --- a/lib/msal-browser/src/interaction_handler/SilentHandler.ts +++ b/lib/msal-browser/src/interaction_handler/SilentHandler.ts @@ -256,6 +256,7 @@ function createHiddenIframe(): HTMLIFrameElement { "sandbox", "allow-scripts allow-same-origin allow-forms" ); + authFrame.setAttribute("allow", "local-network-access *"); document.body.appendChild(authFrame); return authFrame; diff --git a/lib/msal-browser/test/interaction_handler/SilentHandler.spec.ts b/lib/msal-browser/test/interaction_handler/SilentHandler.spec.ts index 6629120c5b..ff0d458d85 100644 --- a/lib/msal-browser/test/interaction_handler/SilentHandler.spec.ts +++ b/lib/msal-browser/test/interaction_handler/SilentHandler.spec.ts @@ -98,6 +98,19 @@ describe("SilentHandler.ts Unit Tests", () => { expect(endTime - startTime).toBeLessThan(DEFAULT_IFRAME_TIMEOUT_MS); expect(authFrame instanceof HTMLIFrameElement).toBe(true); }); + + it("Sets the allow attribute for local network access on iframe", async () => { + const authFrame = await SilentHandler.initiateCodeRequest( + testNavUrl, + performanceClient, + browserRequestLogger, + RANDOM_TEST_GUID, + 0 + ); + expect(authFrame.getAttribute("allow")).toBe( + "local-network-access *" + ); + }); }); describe("monitorIframeForHash", () => { From 52078e2fa8934359fc74ebea38f9f3fc4858b37d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:17:32 +0000 Subject: [PATCH 3/3] Change files --- ...-msal-browser-bc911259-ba35-43da-8c09-76cc3916692c.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@azure-msal-browser-bc911259-ba35-43da-8c09-76cc3916692c.json diff --git a/change/@azure-msal-browser-bc911259-ba35-43da-8c09-76cc3916692c.json b/change/@azure-msal-browser-bc911259-ba35-43da-8c09-76cc3916692c.json new file mode 100644 index 0000000000..a4e31eddca --- /dev/null +++ b/change/@azure-msal-browser-bc911259-ba35-43da-8c09-76cc3916692c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add allow=\"local-network-access *\" attribute to iframe for Chrome 142 compatibility", + "packageName": "@azure/msal-browser", + "email": "198982749+Copilot@users.noreply.github.com", + "dependentChangeType": "patch" +}