microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.1.0-preview-0007

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/samples/AllInvokesBot/README.md

52lines · modecode

1# AllInvokesBot Testing Guide
2
3A sample bot demonstrating Teams invoke handlers.
4
5## Setup
6
71. Configure bot credentials in `appsettings.json` or environment variables
82. Run the bot: `dotnet run`
93. Upload `manifest.json` to Teams
10
11## Testing Handlers
12
13### OnMessage
14**Manifest:** `bots` section with appropriate `scopes` (personal, team, groupChat)
15
161. Send any message to the bot in 1:1 chat
172. Verify welcome card with action buttons appears
18
19### OnAdaptiveCardAction
20**Manifest:** No specific requirement (triggered by adaptive card actions)
21
221. After receiving the welcome card
232. Click any action button on the card
243. Verify action response card appears
254. Console logs will show the verb and data
26
27**File Upload Flow:**
281. Click "Request File Upload" button
292. Verify file consent card appears
30
31### OnFileConsent
32**Manifest:** `bots.supportsFiles: true`
33**Azure:** Delegated permission `Files.ReadWrite.All` required in Azure app registration
34
351. After requesting file upload (see above)
362. Click Accept or Decline on the file consent card
373. If Accept - verify file uploads and file info card appears
384. If Decline - verify console logs the decline action
39
40### OnTaskFetch
41**Manifest:** No specific requirement (triggered by task module actions)
42
431. Click "Open Task Module" button on the welcome card
442. Verify task module dialog opens with input form
45
46### OnTaskSubmit
47**Manifest:** No specific requirement (works with OnTaskFetch)
48
491. Open task module (see OnTaskFetch)
502. Fill in the form
513. Click submit
524. Verify "Done" message appears
53