Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
page_type description products languages extensions contentType createdDate
sample
Microsoft Teams sample app for demonstrating deeplink from Bot chat to Tab consuming Subentity ID
office-teams
office
office-365
csharp
samples
07-07-2021 13:38:27

DeepLink

This sample displays how to consume SubEntity Id to DeepLink from Bot to Tab and Tab to Tab.

Prerequisites

Tools

  • .NET Core SDK version 3.1

    # determine dotnet version
    dotnet --version
  • Ngrok (Only for devbox testing) Latest (any other tunneling software can also be used)

    # run ngrok locally
    ngrok http -host-header=localhost 3978
  • Teams Microsoft Teams is installed and you have an account

  1. Clone the repository
    git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
  2. If you are using Visual Studio
  • Launch Visual Studio
  • File -> Open -> Project/Solution
  • Navigate to samples\DeepLinkBot-SubEntityID\csharp folder
  • Select DeepLinkBot.sln file
  1. Run ngrok - point to port 3978 ngrok http -host-header=rewrite 3978
  2. Create a new Bot by following steps mentioned in Build a bot documentation.
  1. Go to appsettings.json and add MicrosoftAppId and MicrosoftAppPassword information.
  2. Update DeepLink Urls with MicrosoftAppID and EntityID with respective values in DeepLinkHelper class and HomeController.
  3. Run your app, either from Visual Studio with F5 or using dotnet run in the appropriate folder.
  4. Update the manifest.json file with Microsoft-App-ID,ContentUrl, WebsiteUrl and EntityID value.
  5. Install the app in Teams.

Interacting with the app in Teams

  1. Interact with DeepLink bot by pinging it in either personal scope or channel by @mentioning bot.

Bot deep link card

  1. Select the option from the options displayed in the adaptive card. This will redirect to the respective Task in the static tab/ channel tab. Static Tab:

Redirect Tab

Channel Tab:

Channel Tab

  1. Click on Back to List to view all the options. User can select an option which will redirect to the respective Task in static tab/ channel tab.

Additional Deep link features using Microsoft Teams SDK v2.0.0

Additional Features

Additional Features