Hello,
You are bumping into a hard platform limit, not a missing toggle.
login.microsoftonline.com always sends X-Frame-Options: DENY for its interactive sign-in pages so they cannot be rendered inside an iframe. This is a security control from Microsoft Entra ID to block clickjacking and similar attacks, and it is not something you can override from Dynamics or from your React app.
When your React app loads mrc-xxx-xxx.crm.dynamics.com in an iframe, Dynamics sees that the user is not authenticated in that browser context, so it redirects to login.microsoftonline.com. At that point the iframe tries to show the Microsoft login page, the login service sends X-Frame-Options: DENY, and the browser refuses to display it. That is why you see the console error.
So, about this statement:
This happens because Dynamics does not accept iframe authentication without the AllowEmbedding setting enabled. The login.microsoftonline.com error is the SYMPTOM. The Dynamics redirect is the CAUSE.
I would not fully agree with it.
It is true that Dynamics is redirecting you, so in that sense the redirect is part of the cause. But the real blocker you are seeing is the Entra login page itself, which is intentionally non-frameable. Even if Dynamics had an AllowEmbedding option for its own pages, that would not change the headers returned by login.microsoftonline.com. The X-Frame-Options: DENY on the login domain is what actually stops the iframe, and that header is controlled only by Microsoft, not by a setting in your tenant.
Settings like HTTP/X-Frame-Options or any embedding flags that you might find on portals or apps only affect how your Dynamics or portal pages can be embedded. They do not make the Microsoft login service embeddable.
The way to solve this in a React app is to change the design so that the Microsoft login flow never runs inside an iframe at all. In practice, that means:
- Handle Entra ID sign-in at top level or with a popup window in your React app, using Microsoft Authentication Library for JavaScript (MSAL) or an equivalent supported flow, not in an iframe.
- Once the user is authenticated and you have tokens, either open Dynamics in a normal browser tab or window (which is what you already see working) or use the tokens to call Dataverse or other APIs from your React app instead of trying to embed the full Dynamics UI in an iframe.
From a Microsoft best-practice standpoint, trying to keep the entire Dynamics UI inside an iframe in a custom React app while relying on the Entra interactive login inside that same iframe is not supported and will keep failing with exactly the error you are seeing.