I am developing a custom Teams tab. In the tab i am rendering my React web app with the @microsoft/teams-js package. I want to open an existing word file in the Teams SharePoint in the embedded word app in Teams. How can I create such a deep link (https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-application?tabs=teamsjs-v2) to open my word file in the embedded word?
I tried to open the direct web link to the SharePoint file, but unfortunately this only opens the file in the word online version in the browser and not in the embedded word in teams:
microsoftTeams.app.openLink(sharePointFileUrl);
As well have I set the "file open preference" setting in Teams to "Teams", which did not work either.