login.microsoftonline.com failing to embed in MS teams

Anonymous
2021-12-07T14:54:18.02+00:00

We have an web app that we add MS Teams as a tab. It uses AAD for logging in and the SAML2.0 protocol. When setting it up within our own company, it worked without a hitch, but when we tried to add it to the ecosystem of one of our clients, it fails during the login redirect with: "login.microsoftonline.com not allowed to be embedded". We believe the issue is coming from the X-FRAME-Options: DENY

155639-abcc701b-dfe7-40f0-a446-ed9144873289.png

But it's working within our own ecosystem. I asked our client if they have any kind of custom safe-guards in place that might be driving this behaviour but the answer came back negative. Does anyone know where this option could be added in/ removed from? Browsing the net says that that's not something that can be removed, but it definitely is not present in our own setup.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2021-12-10T17:34:39.64+00:00

    I have not encountered this personally, but based on this Stack Overflow thread the "x-frame-options: allow-from" (and Deny) works on some browsers but not others. It doesn't work on Firefox or Chrome, for example. The customer might need to create a custom header that sends the correct data. It's better to use the Content-Security-Policy because it is supported on all browsers now. It could be that you and your customer are using different browsers, or that like you said this is only present in their environment.

    I've also reached out to the product team about your specific error with the "login.microsoftonline.com" setup, and will get back to you as soon as I have a reply.


Your answer

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