Unable to Open my Web App inside Teams

Garima Vijay 1 Reputation point
2022-09-14T12:54:44.843+00:00

I have an external web app that i want to open in my own customized channel tab without using inbuilt website app. when I pass url created dynamically it asks for authentication .
240939-image.png

When I pass my url hardcoded , then I am able to see login screen but unable to login .
This is my javascript code to open url in teams tab.
241043-image.png

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,201 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 2,341 Reputation points Microsoft Vendor
    2022-09-15T12:49:03.197+00:00

    Ensure that you adhere to the following prerequisites while building your Teams personal and channel or group tab:

    Allow your tab pages to be discovered in an iFrame, using X-Frame-Options and Content-Security-Policy HTTP response headers.

    • Set header: Content-Security-Policy: frame-ancestors teams.microsoft.com *.teams.microsoft.com *.skype.com
    • For Internet Explorer 11 compatibility, set X-Content-Security-Policy.
    • Alternately, set header X-Frame-Options: ALLOW-FROM https://teams.microsoft.com/. This header is deprecated but still accepted by most browsers.

    Login pages don't render in iFrames, as a safeguard against clickjacking. Your authentication logic needs to use a method other than redirect. For example, use token-based or cookie-based authentication.

    Reference Document-https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-channel-group-tab?pivots=node-java-script

    Tab Prerequisites-https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/tab-requirements

    Thanks,

    Sayali


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments

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.