page_type | description | products | languages | extensions | contentType | createdDate | ||||
---|---|---|---|---|---|---|---|---|---|---|
sample |
Microsoft Teams sample app for demonstrating deeplink from Bot chat to Tab consuming Subentity ID |
|
|
samples |
07-07-2021 13:38:27 |
This sample displays how to consume SubEntity Id to DeepLink from Bot to Tab and Tab to Tab.
-
.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
- Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
- If you are using Visual Studio
- Launch Visual Studio
- File -> Open -> Project/Solution
- Navigate to
samples\DeepLinkBot-SubEntityID\csharp
folder - Select
DeepLinkBot.sln
file
- Run ngrok - point to port 3978
ngrok http -host-header=rewrite 3978
- Create a new Bot by following steps mentioned in Build a bot documentation.
- Ensure that you've enabled the Teams Channel
- Go to appsettings.json and add
MicrosoftAppId
andMicrosoftAppPassword
information. - Update DeepLink Urls with
MicrosoftAppID
andEntityID
with respective values in DeepLinkHelper class and HomeController. - Run your app, either from Visual Studio with
F5
or usingdotnet run
in the appropriate folder. - Update the manifest.json file with
Microsoft-App-ID
,ContentUrl
,WebsiteUrl
andEntityID
value. - Install the app in Teams.
- Interact with DeepLink bot by pinging it in either personal scope or channel by @mentioning bot.
- 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: Channel Tab:
- 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.