Skip to content

Commit c4c6654

Browse files
Merge pull request #1818 from OfficeDev/v-mfurquan/Bot-SharedChannelEvents-Updates-1
Bot Shared Channel Events Updated with Transitive Member Events
2 parents c7ae849 + 324cd13 commit c4c6654

12 files changed

+318
-1551
lines changed

.github/workflows/build-complete-samples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ jobs:
502502

503503
- project_path: 'samples/bot-shared-channel-events/csharp/SharedChannelEvents/SharedChannelEvents.csproj'
504504
name: 'bot-shared-channel-events'
505-
version: '6.0.x'
505+
version: '8.0.x'
506506

507507
- project_path: 'samples/graph-membership-change-notification/csharp/ChangeNotification/ChangeNotification.csproj'
508508
name: 'graph-membership-change-notification'

samples/bot-shared-channel-events/csharp/M365Agent/appPackage/manifest.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
3-
"manifestVersion": "1.19",
2+
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.22/MicrosoftTeams.schema.json",
3+
"manifestVersion": "devPreview",
44
"version": "1.0.0",
55
"id": "${{TEAMS_APP_ID}}",
66
"developer": {
@@ -31,9 +31,7 @@
3131
"isNotificationOnly": false
3232
}
3333
],
34-
"supportedChannelTypes": [
35-
"sharedChannels"
36-
],
34+
"supportsChannelFeatures": "tier1",
3735
"accentColor": "#60A18E",
3836
"permissions": [
3937
"identity",
@@ -57,4 +55,4 @@
5755
]
5856
}
5957
}
60-
}
58+
}

samples/bot-shared-channel-events/csharp/README.md

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The feature shown in this sample is currently available in public developer prev
2626

2727
## Interaction with app
2828

29-
![Meetings Events](SharedChannelEvents/Images/SharedChannelEvents.gif)
29+
![Shared Channel Events](SharedChannelEvents/Images/SharedChannelEvents.gif)
3030

3131
## Prerequisites
3232

@@ -115,7 +115,7 @@ The simplest way to run this sample in Teams is to use Microsoft 365 Agents Tool
115115

116116
4) Setup Manifest for Teams
117117

118-
Modify the `manifest.json` in the `/appPackage` folder and replace the following details
118+
Modify the `manifest.json` in the `/appPackage` folder and replace the following details
119119

120120
- `<<App-ID>>` with your Microsoft Entra ID app registration id
121121
- `<<VALID DOMAIN>>` with base Url domain. E.g. if you are using ngrok it would be `https://1234.ngrok-free.app` then your domain-name will be `1234.ngrok-free.app` and if you are using dev tunnels then your domain will be like: `12345.devtunnels.ms`.
@@ -126,52 +126,122 @@ Modify the `manifest.json` in the `/appPackage` folder and replace the following
126126
- Then select the `manifest.zip` file from `appPackage`.
127127
- Install the App in Teams Channels.
128128
129+
5) Update your App Manifest for Developer Preview
130+
131+
To enable member events for shared channels, update your `manifest.json` with the following:
132+
133+
- Update the manifest schema and version:
134+
```json
135+
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.22/MicrosoftTeams.schema.json",
136+
"manifestVersion": "devPreview"
137+
```
138+
139+
- Add the `supportsChannelFeatures` property to enable tier 1 channel support:
140+
```json
141+
"supportsChannelFeatures": "tier1"
142+
```
143+
129144
## Running the sample
130145
131146
**Shared Channel Events:**
132147
148+
**1. Install the app:** Upload and install the bot application in Microsoft Teams.
149+
133150
![Shared Channel Events](SharedChannelEvents/Images/1.Install.png)
134151
152+
**2. Select Teams:** Choose the team where you want to add the bot and create a shared channel.
153+
135154
![Shared Channel Events](SharedChannelEvents/Images/2.Select_Teams.png)
136155
156+
**3. Add Channel:** Click on the option to add a new channel to the selected team.
157+
137158
![Shared Channel Events](SharedChannelEvents/Images/3.Add_Channel.png)
138159
160+
**4. Create Shared Channel:** Configure and create a new shared channel with the appropriate settings.
161+
139162
![Shared Channel Events](SharedChannelEvents/Images/4.Create_Channel.png)
140163
164+
**5. Select Members for Shared Channel:** Choose the members or teams that will have access to the shared channel.
165+
141166
![Shared Channel Events](SharedChannelEvents/Images/5.SelectMember_For_ShareChannel.png)
142167
168+
**6. Manage Created Shared Channel:** View and manage the settings of the newly created shared channel.
169+
143170
![Shared Channel Events](SharedChannelEvents/Images/6.Manage_Created_Shared_Channel.png)
144171
172+
**7. Select Apps Tab:** Navigate to the Apps tab within the shared channel.
173+
145174
![Shared Channel Events](SharedChannelEvents/Images/7.Select_Apps_Tab.png)
146175
176+
**8. Add App to Channel:** Select and add the bot application to the shared channel.
177+
147178
![Shared Channel Events](SharedChannelEvents/Images/8.Select_App_Add_To_Channel.png)
148179
180+
**9. Add Member to Channel:** Add a new member directly to the shared channel.
181+
149182
![Shared Channel Events](SharedChannelEvents/Images/9.Add_Member_To_Channel.png)
150183
184+
**10. Member Added Notification:** The bot receives and displays a notification when a member is added to the channel.
185+
151186
![Shared Channel Events](SharedChannelEvents/Images/10.Member_Added.png)
152187
188+
**11. Remove Member from Channel:** Remove a member from the shared channel.
189+
153190
![Shared Channel Events](SharedChannelEvents/Images/11.Removing_Member_From_Channel.png)
154191
192+
**12. Member Removed Notification:** The bot receives and displays a notification when a member is removed from the channel.
193+
155194
![Shared Channel Events](SharedChannelEvents/Images/12.Member_Removed.png)
156195
196+
**13. Share Channel with Team:** Initiate the process to share the channel with another team.
197+
157198
![Shared Channel Events](SharedChannelEvents/Images/13.Share_Channel_Team.png)
158199
200+
**14. Select Team for Sharing:** Choose the team with which you want to share the channel.
201+
159202
![Shared Channel Events](SharedChannelEvents/Images/14.Select_Team_For_Sharing.png)
160203
204+
**15. Channel Shared with Team:** Confirmation that the channel has been successfully shared with the selected team.
205+
161206
![Shared Channel Events](SharedChannelEvents/Images/15.Channel_Shared_With_Team.png)
162207
208+
**16. Unshare Channel with Team:** Begin the process to unshare the channel from a team.
209+
163210
![Shared Channel Events](SharedChannelEvents/Images/16.Channel_UnShare_With_Team.png)
164211
212+
**17. Remove Channel from Team:** Remove the shared channel from the team.
213+
165214
![Shared Channel Events](SharedChannelEvents/Images/17.Removing_Channel_From_Team.png)
166215
216+
**18. Channel Unshared Notification:** The bot receives and displays a notification when the channel is unshared from a team.
217+
167218
![Shared Channel Events](SharedChannelEvents/Images/18.Channel_UnShared_Notification.png)
168219
220+
**Transitive Member Events**
221+
222+
**19. Add Member to Parent Team (Step 1):** Begin adding a new member to the parent team that has a shared channel.
223+
224+
![Transitive Member Events](SharedChannelEvents/Images/19.Adding_Member_To_Team_D_For_Transitive_Event_1.png)
225+
226+
**20. Select Member to Add (Step 2):** Choose the member to add to the parent team.
227+
228+
![Transitive Member Events](SharedChannelEvents/Images/20.Select_Member_To_Add_For_TeamD_For_Transitive_Event_2.png)
229+
230+
**21. Transitive Member Added Event:** The bot receives a transitive member added event when a member is added to the parent team and automatically becomes a member of the shared channel.
231+
232+
![Transitive Member Events](SharedChannelEvents/Images/21.Transitive_Member_Added_Removed_Event_Triggered.png)
233+
234+
**22. Transitive Member Removed Event:** The bot receives a transitive member removed event when a member is removed from the parent team and is automatically removed from the shared channel.
235+
236+
![Transitive Member Events](SharedChannelEvents/Images/22.Transitive_Member_Added_Removed_Event_Triggered.png)
237+
238+
239+
169240
## Deploy the bot to Azure
170241
171242
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.
172243
173244
## Further reading
174-
175-
- To be included once the release is completed.
245+
- [Build-Apps-For-Shared-Private-Channels](https://learn.microsoft.com/en-us/microsoftteams/platform/build-apps-for-shared-private-channels?tabs=tabs%2Cexternal-users%2Csharedchannel).
176246
177247
<img src="https://pnptelemetry.azurewebsites.net/microsoft-teams-samples/samples/bot-shared-channel-events/csharp" />

0 commit comments

Comments
 (0)