I have installed an app in a tab and wanted to redirect to another tab.
The url of the tab is of the form https://teams.microsoft.com/l/channel/<entityId>/<tabId>?label=Wiki&groupId=<groupId>&tenantId=<tenantId>
For doing this I have tried the following -
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.
microsoftTeams.navigateCrossDomain(url);
Shows in the console that this method is deprecated but nothing on the documentation page and no redirection.
microsoftTeams.navigateToTab(tabName...)
No error or any redirection
1. What should I change for redirection to be successful?
2. What is the proper way to do this?
Edit 1:
The link that I have posted in the question is a deep link.
The problem does not lie in redirection. I can directly enter the url in the address bar and get redirected to the tab. The issue lies with getting this screen.
It appears even when I am within Teams desktop app and no redirection takes place after that. If I do the same process via the Teams web app, I can open the console and see a mixed content warning error that a https page is trying to call a msteams url.
When I directly enter this url in browser, even though this screen appears my teams app is able to display the channel.
Note -
- navigateCrossDomain does not redirect instead prints to console that it is deprecated.
- navigateToTab also does not seem to do anything as it is not printing any error in console nor is it performing any redirection.
Edit 2 -
- I tried opening the Teams web app in Edge and it's able to redirect properly using window.location.href.
What doesn't work
Redirecting inside Teams desktop app
Redirecting in Teams web app in Chrome
Redirecting using navigateCrossDomain()