authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”

Message par Clippy »

authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”

Message par Clippy »

Microsoft does not allow its authentication dialog to open in an I-frame. It works fine in browser but MS Teams is implemented on I-frame, that is why you are getting this error.

Please have a look into [Microsoft Teams authentication flow for tabs](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab) flow.

Here is a ink for [Auth code sample](https://github.com/OfficeDev/microsoft-teams-sample-complete-node/tree/master/src/views/tab-auth)
Répondre

Revenir à « Microsoft Teams »