{"id":30441843,"url":"https://github.com/interserver/teams-chat-bot","last_synced_at":"2025-08-23T07:37:29.718Z","repository":{"id":311205364,"uuid":"1042874058","full_name":"interserver/teams-chat-bot","owner":"interserver","description":"Chat bot for MS Teams to receive notifications from and interact with our Datacenter Administration and BIlling Automation","archived":false,"fork":false,"pushed_at":"2025-08-22T18:15:49.000Z","size":24217,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-22T20:56:01.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interserver.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-22T18:08:35.000Z","updated_at":"2025-08-22T18:15:49.000Z","dependencies_parsed_at":"2025-08-22T21:06:27.256Z","dependency_job_id":null,"html_url":"https://github.com/interserver/teams-chat-bot","commit_stats":null,"previous_names":["interserver/teams-chat-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/interserver/teams-chat-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interserver%2Fteams-chat-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interserver%2Fteams-chat-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interserver%2Fteams-chat-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interserver%2Fteams-chat-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interserver","download_url":"https://codeload.github.com/interserver/teams-chat-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interserver%2Fteams-chat-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745913,"owners_count":24813530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-23T07:37:25.485Z","updated_at":"2025-08-23T07:37:29.697Z","avatar_url":"https://github.com/interserver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\npage_type: sample\ndescription: This bot can capture all channel messages in Teams using RSC permissions, without the need for @mentions.\nproducts:\n- office-teams\n- office\n- office-365\nlanguages:\n- nodejs\nextensions:\n contentType: samples\n createdDate: \"06/10/2021 01:48:56 AM\"\nurlFragment: officedev-microsoft-teams-samples-bot-receive-channel-messages-withRSC-nodejs\n---\n\n# Receive Channel messages with RSC permissions\n\nThis sample app illustrates how a bot can capture all channel messages in Microsoft Teams by utilizing RSC (resource-specific consent) permissions, eliminating the need for @mentions. The bot supports adaptive card responses, easy local testing with tools like ngrok or dev tunnels, and deployment to Azure, allowing it to function effectively across different channels and group chats in Teams.\n\nThis feature shown in this sample is currently available in Public Developer Preview only.\n\n## Included Features\n* Bots\n* Adaptive Cards\n* RSC Permissions\n\n## Interaction with app\n\n![Bot Receive Channel MessagesWithRSCGif](images/Bot_Channel_Messenging-RSC-nodejs-gif.gif)\n\n## Try it yourself - experience the App in your Microsoft Teams client\nPlease find below demo manifest which is deployed on Microsoft Azure and you can try it yourself by uploading the app package (.zip file link below) to your teams and/or as a personal app. (Uploading must be enabled for your tenant, [see steps here](https://docs.microsoft.com/microsoftteams/platform/concepts/build-and-test/prepare-your-o365-tenant#enable-custom-teams-apps-and-turn-on-custom-app-uploading)).\n\n**Receive Channel messages with RSC permissions:** [Manifest](/samples/bot-receive-channel-messages-withRSC/csharp/demo-manifest/Bot-RSC.zip)\n\n## Prerequisites\n\n1. Office 365 tenant. You can get a free tenant for development use by signing up for the [Office 365 Developer Program](https://developer.microsoft.com/en-us/microsoft-365/dev-program).\n\n2. To test locally, [NodeJS](https://nodejs.org/en/download/) must be installed on your development machine (version 16.14.2  or higher).\n\n    ```bash\n    # determine node version\n    node --version\n    ```\n3. [dev tunnel](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/get-started?tabs=windows) or [Ngrok](https://ngrok.com/download) (For local environment testing) latest version (any other tunneling software can also be used)\n\n   If you are using Ngrok to test locally, you'll need [Ngrok](https://ngrok.com/) installed on your development machine.\n   Make sure you've downloaded and installed Ngrok on your local machine. ngrok will tunnel requests from the Internet to your local computer and terminate the SSL connection from Teams.\n\n4. [Microsoft 365 Agents Toolkit for VS Code](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) or [TeamsFx CLI](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-cli?pivots=version-one)\n\n## Run the app (Using Microsoft 365 Agents Toolkit for Visual Studio Code)\n\nThe simplest way to run this sample in Teams is to use Microsoft 365 Agents Toolkit for Visual Studio Code.\n\n1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview)\n1. Install the [Microsoft 365 Agents Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension)\n1. Select **File \u003e Open Folder** in VS Code and choose this samples directory from the repo\n1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps\n1. Select **Debug \u003e Start Debugging** or **F5** to run the app in a Teams web client.\n1. In the browser that launches, select the **Add** button to install the app to Teams.\n\n\u003e If you do not have permission to upload custom apps (uploading), Microsoft 365 Agents Toolkit will recommend creating and using a Microsoft 365 Developer Program account - a free program to get your own dev environment sandbox that includes Teams.\n\n## Setup\n\n\u003e NOTE: The free ngrok plan will generate a new URL every time you run it, which requires you to update your Azure AD registration, the Teams app manifest, and the project configuration. A paid account with a permanent ngrok URL is recommended.\n\n1) Setup for Bot\n- Register Azure AD application\n- Register a bot with Azure Bot Service, following the instructions [here](https://docs.microsoft.com/azure/bot-service/bot-service-quickstart-registration?view=azure-bot-service-3.0).\n\n- Ensure that you've [enabled the Teams Channel](https://docs.microsoft.com/azure/bot-service/channel-connect-teams?view=azure-bot-service-4.0)\n- While registering the bot, use `https://\u003cyour_tunnel_domain\u003e/api/messages` as the messaging endpoint.\n    \n    \u003e NOTE: When you create your app registration in Azure portal, you will create an App ID and App password - make sure you keep these for later.\n\n2) Setup NGROK\n - Run ngrok - point to port 3978\n\n   ```bash\n   ngrok http 3978 --host-header=\"localhost:3978\"\n   ```  \n\n   Alternatively, you can also use the `dev tunnels`. Please follow [Create and host a dev tunnel](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/get-started?tabs=windows) and host the tunnel with anonymous user access command as shown below:\n\n   ```bash\n   devtunnel host -p 3978 --allow-anonymous\n   ```\n\n3) Setup for code\n- Clone the repository\n\n    ```bash\n    git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git\n    ```\n\n- In the folder where repository is cloned navigate to `samples/bot-receive-channel-messages-withRSC/nodejs`\n\n- Install node modules\n\n   Inside node js folder, open your local terminal and run the below command to install node modules. You can do the same in Visual Studio code terminal by opening the project in Visual Studio code.\n\n    ```bash\n    npm install\n    ```\n- Update the `.env` configuration for the bot to use the `MicrosoftAppId` (Microsoft App Id) and `MicrosoftAppPassword` (App Password) from the Microsoft Entra ID app registration in Azure portal or from Bot Framework registration. \n\u003e NOTE: the App Password is referred to as the `client secret` in the azure portal app registration service and you can always create a new client secret anytime.\n\n- Run your app\n    ```bash\n    npm start\n    ```\n- Install modules \u0026 Run the NodeJS Server\n  - Server will run on PORT: 3978\n  - Open a terminal and navigate to project root directory\n  \n  ```bash\n    npm run server\n  ```\n\u003e NOTE:This command is equivalent to: npm install \u003e npm start\n\n4) Run your app\n\n    ```bash\n    npm start\n    ```\n5) Setup Manifest for Teams\n\n    - **Edit** the `manifest.json` contained in the `appManifest` folder to replace your Microsoft App Id (that was created when you registered your bot earlier) *everywhere* you see the place holder string `\u003c\u003cYOUR-MICROSOFT-APP-ID\u003e\u003e` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) \n        `\u003c\u003cDOMAIN-NAME\u003e\u003e` 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`.\n         Replace \u003c\u003cMANIFEST-ID\u003e\u003e with any GUID or with your MicrosoftAppId/app id\n\n    - **Zip** up the contents of the `appManifest` folder to create a `manifest.zip`\n    - **Upload** in a team to test\n         - Select or create a team\n         - Select the ellipses **...** from the left pane. The drop-down menu appears.\n         - Select **Manage Team**, then select **Apps** \n         - Then select **Upload a custom app** from the lower right corner.\n         - Then select the `manifest.zip` file from `appManifest`, and then select **Add** to add the bot to your selected team.\n\n**Note**: If you are facing any issue in your app, please uncomment [this](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/bot-receive-channel-messages-withRSC/nodejs/server/api/botController.js#L24) line and put your debugger for local debug.\n\n## Running the sample\n\n**Adding bot UI:**\n\n![App installation](images/1.Install.png)\n\n**Hey command interaction:**\n\n![Permissions](images/3.Interaction.png)\n\n**1 or 2 command interaction:**\n\n![Permissions](images/4.1_and_2_Command_Interaction.png) \n\n**Adding App to group chat:**\n\n![Adding To Groupchat](images/5.Install_to_GC.png) \n\n**Group chat interaction with bot without being @mentioned:**\n\n![Group Chat](images/7.1_and_2_Command_Interaction.png) \n\n**Interacting with the bot in Teams**\n\nSelect a channel and enter a message in the channel for your bot.\n\nThe bot receives the message without being @mentioned.\n\n## Deploy the bot to Azure\n\nTo 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.\n\n## Further reading\n\n- [Bot Framework Documentation](https://docs.botframework.com)\n- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)\n- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)\n- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0)\n- [Receive Channel messages with RSC](https://docs.microsoft.com/microsoftteams/platform/bots/how-to/conversations/channel-messages-with-rsc)\n\n\n\u003cimg src=\"https://pnptelemetry.azurewebsites.net/microsoft-teams-samples/samples/bot-receive-channel-messages-withRSC-nodejs\" /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterserver%2Fteams-chat-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterserver%2Fteams-chat-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterserver%2Fteams-chat-bot/lists"}