Using this C# sample, a bot can receive all channel messages with RSC without @mention. For reference please check Receive Channel messages with RSC
This feature shown in this sample is currently available in Public Developer Preview only.
- Showing messages based on option selected
-
.NET Core SDK version 3.1
# determine dotnet version dotnet --version -
Publicly addressable https url or tunnel such as ngrok or Tunnel Relay
- Run ngrok - point to port 3978
# ngrok http -host-header=rewrite 3978-
Create a Bot Registration In Azure portal, create a Bot Framework registration resource.
-
Modify the
manifest.jsonin the/AppManifestfolder and replace the{{BOT-ID}}with the id from step 2. -
Zip the contents of
AppManifestfolder into amanifest.zip, and use themanifest.zipto deploy in app store or add to Teams as in step 7. -
Modify the
/appsettings.jsonand fill in the{{ Bot Id }},{{ Bot Password }}with the id from step 2.
- This step is specific to Teams.
-
Edit the
manifest.jsoncontained in theAppManifestfolder 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 themanifest.json) also update the<<DOMAIN-NAME>>with the ngrok URL` -
Zip up the contents of the
appPackagefolder to create amanifest.zip -
Sideload in a team to test
- Select or create a team
- Select the ellipses ... from the left pane. The drop-down menu appears.
- Select Manage Team, then select Apps
- Then select Upload a custom app from the lower right corner.
- Then select the
manifest.zipfile fromappPackage, and then select Add to add the bot to your selected team.
-
-
In a terminal, navigate to
ReceiveMessagesWithRSC# change into project folder cd # ReceiveMessagesWithRSC
-
Run the bot from a terminal or from Visual Studio, choose option A or B.
A) From a terminal
# run the bot dotnet runB) Or from Visual Studio
- Launch Visual Studio
- File -> Open -> Project/Solution
- Navigate to
ReceiveMessagesWithRSCfolder - Select
ReceiveMessagesWithRSC.csprojfile - Press
F5to run the project
Select a channel and enter a message in the channel for your bot.
The bot receives the message without being @mentioned.
To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.


