How to have a deep link open the installed app in MS Teams? Not the app page on the Teams Store.

Qa Test 0 Reputation points
2024-07-31T15:19:33.1566667+00:00

When sending activity feed notifications in MS Teams, we are doing:

client.api(`/users/${msTeamsUserId}/teamWork/sendActivityNotification`).post(sendActivityNotification);

where

const sendActivityNotification = {
        topic: {
          source: 'text',
          value: `sample_value`,
          webUrl: `https://teams.microsoft.com/l/app/${appId}`,
        },
		....
		....
		....
}

During testing, when we click on this activity notification, the app page of the app on the MS Teams Store appears with an 'open' button rather than going directly to the installed app itself. What should we use for the appId in the webUrl to make it navigate to the installed app for the user?

I'm not sure if this is relevant, but on this doc, it says, "You can create a deep links for a custom app. However, if an app in the Microsoft Teams Store shares the same app ID as the custom app ID, the deep link opens the app from Teams Store instead of the custom app."

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,894 questions
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,919 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prasad-MSFT 8,956 Reputation points Microsoft External Staff Moderator
    2024-08-01T05:47:09.4066667+00:00

    If you are using deep link url as https://teams.microsoft.com/l/app/<your-app-id> , it will open an app install dialog from your Teams client using app ID as stated in below documentation:
    https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-application?tabs=teamsjs-v2#deep-link-to-open-application-install-dialog

    If you want to browse within your app, you can follow below documentation:
    https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-application?tabs=teamsjs-v2#deep-link-to-browse-within-your-app
    and to navigate to chat within application you can refer below documentation:
    https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-application?tabs=teamsjs-v2#deep-link-to-a-chat-with-the-application

    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.