Closed kumarUtsav-01 closed 4 months ago
@kumarUtsav-01 - Could you please let us know which document are you following to construct the above deeplink? Here is the document for creating deeplinks https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-links.
Hi @Meghana-MSFT , We are using the same document for generating deeplink. We are using the deeplink to manually link to a MS Teams tab application that we have created. We are adding some extra query parameters at the end to pass some data to the tab application. Once we launch the link, it goes to teams launcher page that I have attached as screenshots.
Are you following this https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-application?tabs=teamsjs-v2#configure-deep-link-to-browse-within-your-app-manually section?
Example of launcher link with 3300 characters in URL: MSLink
The above shared example link does not seem to be in the format mentioned in the doc. It has https://teams.microsoft.com/dl/launcher/launcher.html format which is different from the ones documented.
Correct, we are using that section only.
The URL that I shared is the launcher link (contains https://teams.microsoft.com/dl/launcher/launcher.html) which automatically comes up when we launch the deeplink URL. This is the deeplink URL, that we are using MSDeepLink
We are also able to repro this issue, we will check this internally and get back to you.
@kumarUtsav-01 - We checked this with engineering team and have the following recommendation-
There are maximum URL limits at the Windows level that Teams has no control over. App developer should limit their URL length to something that works. The app should call their backend to get the data rather than trying to pass it all through the deep link.
Yeah, I understand the link is long, but, the same link works in a MAC system. Please correct me if I am wrong, but, ideally shouldn't the link work either in both MAC and Windows or none of them? if it is a windows level restriction it shouldn't have worked on browser on windows. It works even for the windows browser app as well, just only windows desktop app has the issue. I urge you to recheck this.
We will check this internally and get back to you.
@kumarUtsav-01, the limitation comes from the Windows ShellExecuteEx API which browsers use to launch the Teams Desktop Client to handle the deep link. ShellExecuteEx paths are limited by INTERNET_MAX_URL_LENGTH which is 2048 characters (and that needs to also include the path to the Teams executable).
You can find more details in these posts: https://devblogs.microsoft.com/oldnewthing/20031210-00/?p=41553 https://stackoverflow.com/questions/26427286/passing-parameters-to-a-custom-uri https://stackoverflow.com/questions/2916865/how-to-get-around-the-command-line-length-limit
Passing large amounts of data via deep links is not a good idea. You should instead pass a unique identifier in the deep link that your app then uses to fetch the data from your backend service.
@ydogandjiev , our use-case does not allow storing of data as the data will be passed to the user in real time through our custom app for collaboration post a button click. Once, it is passed to the user, there is no point of holding that data for us. Can we try to communicate with Windows ShellExecute API service and ask them to increase the limit if that is possible?
Steps to reproduce
We are experiencing a problem with MS Teams desktop app in windows system. We have created a MS teams app which allows a user to share any long content to any user in his/her organization through MS teams. The content is passed as a query parameter to the Deeplink of the teams app.
As the content can be long, so, the Deeplink containing this content also increases in length. While such Deeplinks work fine in MAC machines whether I choose browser or desktop app to launch the app, in Windows, they only work if I choose browser app. In case of choosing desktop app, the application does not launch. There is no error thrown at the launcher page as well.
Example of launcher link with 3300 characters in URL: MSLink
Launcher opened on click of link and desktop app is selected for launch:
In MAC system, the teams desktop app is launched.
In case of windows, teams desktop is not launched if selected. No error is thrown.
Expected behavior
The teams application should launch in desktop application in windows system.
Actual behavior
The teams application does not launch in desktop application in windows system.
Error details
There is no error thrown.