Custom Teams app with Azure authenticaton doesn't work in Teams desktop app

Copper Contributor

We have some webpages which are protected by Azure. I created a custom Teams app package to display one of webpages in Teams. We want the app to work in both browsers and Teams desktop app. After uploaded the package to Teams app catalog and added the app to a Channel tab, I can view my webpage in browsers without any problem. However, if I use Teams desktop app, the tab just shows a blank page. There is an error saying "login.microsoftonline.com" can't be displayed in an iframe.

 

My webpage is protected by Azure, so users will be redirected to Azure login page (login.microsoftonline.com) to sign in when they access the page. In browsers, the page will automatically log in using current user's session as the user already signed in Microsoft Teams. However, in Teams desktop app, the page can't get session from the desktop app and it will redirect the user to Azure login page which doesn't support iFrame.

 

I know custom Teams apps display their content in iframe. However, the Azure login page can't be displayed in an iframe. If the content page of a custom app is protected by Azure, it can't be used by Teams desktop app at all.

 

I spent quite some time but can't find a solution for this. Any suggestion?

 

Thanks,

Matthew

 

Thanks in advance,

 

2 Replies

Thank you Casey for your reply.

The link provides a solution for authentication in browsers. However, we want to support Teams Desktop app as well. The desktop app doesn't allow full frame authentication. When you open a window from desktop app, it will be in a different browser session, or even a totally different browser type (IE, Chrome or FF) depends on your OS settings.