You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Bot Framework v4 Conversation Bot sample for Teams.
4
+
5
+
This bot has been created using [Bot Framework](https://dev.botframework.com). This sample shows
6
+
how to incorporate basic conversational flow into a Teams application. It also illustrates a few of the Teams specific calls you can make from your bot.
7
+
8
+
## Prerequisites
9
+
10
+
- Microsoft Teams is installed and you have an account
11
+
-[ngrok](https://ngrok.com/) or equivalent tunnelling solution
12
+
13
+
## To try this sample
14
+
15
+
> Note these instructions are for running the sample on your local machine, the tunnelling solution is required because
1) Create [Bot Framework registration resource](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration) in Azure
31
+
- Use the current `https` URL you were given by running ngrok. Append with the path `/api/messages` used by this sample
32
+
- Ensure that you've [enabled the Teams Channel](https://docs.microsoft.com/en-us/azure/bot-service/channel-connect-teams?view=azure-bot-service-4.0)
33
+
- __*If you don't have an Azure account*__ you can use this [Bot Framework registration](https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/create-a-bot-for-teams#register-your-web-service-with-the-bot-framework)
34
+
35
+
1) Update the `resources/application.properties` configuration forthe bot to use the Microsoft App Id and App Password from the Bot Framework registration. (Note the App Password is referred to as the "client secret"in the azure portal and you can always create a new client secret anytime.)
36
+
37
+
1) __*This step is specific to Teams.*__
38
+
- **Edit** the `manifest.json` contained in the `teamsAppManifest` folder to replace your Microsoft App Id (that was created when you registered your bot earlier) *everywhere* you see the place holder string `<<YOUR-MICROSOFT-APP-ID>>` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`)
39
+
- **Zip** up the contents of the `teamsAppManifest` folder to create a `manifest.zip`
40
+
- **Upload** the `manifest.zip` to Teams (in the Apps view click "Upload a custom app")
41
+
42
+
1) From the root of this project folder:
43
+
- Build the sample using `mvn package`
44
+
- Unless done previously, install the packages in the local cache by using `mvn install`
45
+
- Run it by using `java -jar .\target\bot-teams-start-new-thread-sample-.jar`
46
+
47
+
48
+
## Interacting with the bot in Teams
49
+
50
+
> Note this `manifest.json` specified that the bot will be installed in "personal", "team" and "groupchat" scope which is why you immediately entered a one on one chat conversation with the bot. You can at mention the bot in a group chat or in a Channel in the Team you installed it in. Please refer to Teams documentation for more details.
51
+
52
+
You can interact with this bot by sending it a message. The bot will respond by creating a new thread in the channel and replying to that new thread.
53
+
54
+
## Deploy the bot to Azure
55
+
56
+
To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions.
57
+
58
+
## Further reading
59
+
60
+
- [How Microsoft Teams bots work](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-basics-teams?view=azure-bot-service-4.0&tabs=javascript)
0 commit comments