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
Bot Framework v4 Teams link unfurling bot sample for Teams.
4
4
5
5
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to create a simple bot that performs link unfurling in Teams.
6
6
7
7
## Prerequisites
8
8
9
+
9
10
-[.NET Core SDK](https://dotnet.microsoft.com/download) version 2.1
10
11
11
12
```bash
12
13
# determine dotnet version
13
14
dotnet --version
14
15
```
16
+
17
+
- Microsoft Teams is installed and you have an account
- Open the ```Create Microsoft App ID and password``` link in a new tab
43
+
- Click on the ```New registration``` button
44
+
- Enter a name, and selectthe```Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)```
45
+
- Click ```Register```
46
+
- Copy & paste the ```Application (client) ID``` field into notepad. This is your botID.
47
+
- Click on ```Certificates & secrets``` tab on the left
48
+
- Click ```New client secret```
49
+
- Enter a name, select`Never`, and click ```Add```
50
+
- Copy & paste the password into notepad. This is your app password.
51
+
- Go back to the bot registration tab and enter the ```botID``` into the app ID field
52
+
- Scroll down, agree to the Terms, and click ```Register```
53
+
- Click the ```Microsoft Teams``` icon on the next screen
54
+
- Click ```Save```
55
+
56
+
### Visual Studio
57
+
- Launch Visual Studio
58
+
- Navigate to and open the `samples/csharp_dotnet/55.teams-link-unfurling-bot` directory
59
+
- Open the ```appsettings.json``` file
60
+
- Paste your botID value into the ```MicrosoftAppId``` field
61
+
- Put the password into the ```MicrosoftAppPassword``` field
62
+
- Save the file
63
+
- Open the ```manifest.json```
64
+
- Replace your botID everywhere you see the place holder string ```<<YOUR-MICROSOFT-BOT-ID>>```
65
+
66
+
67
+
- Run the bot:
68
+
69
+
A) From a terminal
28
70
29
71
```bash
30
72
# run the bot
@@ -33,36 +75,25 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
33
75
34
76
B) Or from Visual Studio
35
77
36
-
- Launch Visual Studio
37
78
- File -> Open -> Project/Solution
38
-
- Navigate to `samples/csharp_dotnetcore/55.teams-link-unfurling` folder
39
-
- Select `TeamsLinkUnfurling.csproj` file
79
+
- Navigate to `samples/csharp_dotnetcore/55.teams-link-unfurling-bot` folder
80
+
- Select `TeamsLinkUnfurlingBot.csproj` file
40
81
- Press `F5` to run the project
41
82
42
-
## Testing the bot using Teams
43
-
44
-
1) run ngrok - point to port 3978
45
-
1) create bot framework registration - using ngrok URL
46
-
1) update your manifest.json to include the app id from bot framework
47
-
1) zip up teams-manifest folder to create a manifest.zip
48
-
1) upload manifest.zip to teams (from Apps view click "Upload a custom app")
49
-
1) pick your bot from the compose command menu
50
-
51
-
## Deploy the bot to Azure
52
-
53
-
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.
| 1. Click ```Add``` button| 1. Click the down arrow to the right of the ```Add``` button <br> 2. Click ```Add to Chat``` <br> 3. Search for and select your group chat <br> 4. Click the ```Set up bot``` button <br> **Note:** There must be at least 1 message in a group chat for it to be searchable | 1. Click the down arrow to the right of the ```Add``` button <br> 2. Click ```Add to Team``` <br> 3. Search for and select your team <br> 4. Click the ```Set up a bot``` button |
96
+
97
+
### Interacting with the bot
98
+
99
+
If you copy and paste a link from https://www.seattletimes.com into the compose message area the link will unfurl.
0 commit comments