From 3bd7531bb194c2e3486bc6158db2859c4d722780 Mon Sep 17 00:00:00 2001 From: Bikram Choudhury Date: Thu, 7 May 2026 18:07:25 +0530 Subject: [PATCH] remove same frame logic --- src/Utils/AuthorizationUtils.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Utils/AuthorizationUtils.ts b/src/Utils/AuthorizationUtils.ts index 1b556a26f..868bbf8c1 100644 --- a/src/Utils/AuthorizationUtils.ts +++ b/src/Utils/AuthorizationUtils.ts @@ -153,8 +153,7 @@ export async function acquireMsalTokenForAccount( // (redirect_in_iframe), so we fall back to loginPopup — MSAL v5's redirect bridge // handles COOP via BroadcastChannel rather than window.opener, so the popup still works. const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake; - const isInIframe = window !== window.parent; - if (isMooncake && !isInIframe) { + if (isMooncake) { if (silent) { // ssoSilent already failed; a redirect cannot be used silently. // Re-throw so the caller knows silent acquisition was not possible. @@ -221,8 +220,7 @@ export async function acquireTokenWithMsal( // we fall back to acquireTokenPopup — MSAL v5's redirect bridge handles COOP via // BroadcastChannel (not window.opener) so the popup works even from within an iframe. const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake; - const isInIframe = window !== window.parent; - if (isMooncake && !isInIframe) { + if (isMooncake) { try { // acquireTokenRedirect navigates the browser away; execution does not continue // past this await. On return, getMsalInstance()'s handleRedirectPromise() will