Azure Portal fails when switching tenant

M. FAJAR HARDIANTO 0 Reputation points
2026-07-31T06:39:21.1666667+00:00

Hi to Expert team Microsoft
I'm experiencing a strange issue with Azure Portal that only occurs on one Windows laptop.

Problem

I can successfully sign in to Azure Portal using my corporate account.

The portal initially opens in my home/original tenant without any issues.

However, when I switch to my corporate tenant, Azure redirects to:
https://portal.azure.com.mcas.ms

and immediately shows this error:

Error code: unknown_msal_error Failed to execute 'replaceState' on 'History': A history state object with URL https://portal.azure.com/auth/login/ cannot be created in a document with origin https://portal.azure.com.mcas.ms and URL https://portal.azure.com.mcas.ms/auth/login/#. The error page URL is:

https://portal.azure.com.mcas.ms/Error/UE_SigninFailed?source=LoginRedirectHandler


What's strange

On another Windows PC using:

  • the same Microsoft account
  • the same Azure tenant
  • the same permissions

everything works correctly.


What I've already tried

Browser troubleshooting:

  • Cleared cookies
  • Cleared cache
  • Cleared browsing history
  • Tested InPrivate/Incognito mode
  • Tested Microsoft Edge
  • Tested Google Chrome
  • Disabled all browser extensions
  • Updated browsers to the latest version

Security software:

  • Disabled Kaspersky Premium completely

Network troubleshooting:

  • Home Wi-Fi
  • Mobile hotspot
  • VPN enabled
  • VPN disabled

Windows checks:

AzureAdJoined : NO EnterpriseJoined : NO WorkplaceJoined : NO WamDefaultSet : NO AzureAdPrt : NO WinHTTP Proxy : DIRECT

The laptop is not Azure AD joined and has no WinHTTP proxy configured.


Additional observation

The issue only happens after switching to my corporate directory.

The initial tenant loads normally.

The failure occurs during the directory switch, when Azure redirects to portal.azure.com.mcas.ms.I'm experiencing a strange issue with Azure Portal that only occurs on one Windows laptop.

Any suggestions or guidance would be greatly appreciated.

Thank you.

Azure Cloud Services
Azure Cloud Services

An Azure platform as a service offer that is used to deploy web and cloud applications.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Sina Salam 31,216 Reputation points Volunteer Moderator
    2026-07-31T14:30:41.43+00:00

    Hello M. FAJAR HARDIANTO,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Azure Portal fails when switching tenant.

    This is a decisive indicator redirect to: https://portal.azure.com.mcas.ms

    That URL means the corporate tenant is routing the Azure Portal browser session through Microsoft Defender for Cloud Apps Conditional Access App Control and that rewrites protected app URLs with the *.mcas.ms suffix when sessions are protected through Conditional Access App Control / reverse proxy.- https://learn.microsoft.com/en-us/defender-cloud-apps/troubleshooting-proxy-url, https://learn.microsoft.com/en-us/defender-cloud-apps/proxy-intro-aad

    The corporate tenant administrator needs to review the affected sign-in event and remove or adjust the Conditional Access policy that applies Use Conditional Access App Control to Azure Portal / Azure management access. Conditional Access App Control is applied through Microsoft Entra Conditional Access session controls and is designed to monitor or control browser-based cloud app sessions in real time. - https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-session, https://learn.microsoft.com/en-us/defender-cloud-apps/conditional-access-app-control-how-to-overview

    However, the best-practice fix is to protect Azure management access with Conditional Access grant controls such as MFA, compliant device, or hybrid joined device, instead of forcing the Azure Portal tenant-switch flow through Defender for Cloud Apps reverse proxy. Azure Portal, Azure PowerShell, and Azure CLI management access are grouped under Windows Azure Service Management API for Conditional Access targeting. - https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-old-require-mfa-azure-mgmt, https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-cloud-apps

    After the policy is corrected, the user should retry the tenant switch from a clean browser session. If the mcas.ms redirect no longer appears and the corporate tenant opens normally. If the policy is corrected and the issue still occurs, collect PortalDiagnostics.json using Ctrl + Alt + A in the Azure Portal and capture a browser trace before escalating to Microsoft Support, as these are the Microsoft-recommended diagnostics for Azure Portal troubleshooting. - https://learn.microsoft.com/en-us/azure/azure-portal/capture-browser-trace

    I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.