Error trying to open another tab inside an app/tab.


Error redirecting using JS in a React app

I have a tab/app installed in teams in which I try to redirect to another tab if some conditions are met.


When I try to redirect, it shows me the standard page of whether to open in web or desktop app, but after that it hangs and does not redirect. I used Teams web app for the same activity and in the console, I could see the error during redirection "Mixed content error". But the link I am redirecting to is an https link and is of the form 

url = https://teams.microsoft.com/l/channel/<entityId>/<tabId>?label=Wiki&groupId=<groupId>&tenantId=<tenantId>

I have tried following options to redirect - 


window.location.href= url //Tabs Url

When viewing the console, I see a mixed content error saying that msteams is being accessed from https page. This is inspte of the fact that I am redirecting to a https url. Also, no redirection.



   Shows in the console that this method is deprecated but nothing on the documentation page and no redirection.



What should I change for redirection to be successful?


Edit 1:

  1. I tried opening the Teams web app in Edge and it's able to redirect properly using window.location.href.

How to get the same behavior while using Chrome or the Teams desktop app ? When I use them , I get this page Teams Screenshot



Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies