Send Messages using Bot/Change Notification in MS Teams
I have some questions regarding bot functionality within Microsoft Teams.
I’m developing an app/plug-in to monitor and analyze all incoming messages in chats and channels. The goal is to intercept these messages, check them for specific flagged (e.g., inappropriate) content, and instantly send a notification back to the respective chat or channel if flagged content is detected. I need to achieve this in real time.
Currently, I’ve implemented the first half of this functionality using Microsoft Graph’s change notifications API, allowing me to intercept and read messages as they arrive. However, I’m facing a limitation: since my app doesn’t have permissions to post messages, I can’t use the Graph API’s send capabilities to notify users within the channels or chats.
To work around this, I’m considering utilizing a bot. My approach is to have a bot send these notifications to the appropriate chats and channels, using identifiers such as tenant ID, team ID, channel ID, message ID, and chat ID—information I retrieve through the change notifications API.
So here are my main questions:
Can I use a bot to send messages to various chats and channels on demand, leveraging the IDs obtained from the change notifications API? This would allow my app to handle message interception while the bot takes over in sending the flagged notifications.In my current setup, is there a way to reply to chats or channels directly using the Graph API’s ‘send’ functionality through the app itself? It is related to Application/Delegation Permissions.
Thanks
HiI have some questions regarding bot functionality within Microsoft Teams.I’m developing an app/plug-in to monitor and analyze all incoming messages in chats and channels. The goal is to intercept these messages, check them for specific flagged (e.g., inappropriate) content, and instantly send a notification back to the respective chat or channel if flagged content is detected. I need to achieve this in real time.Currently, I’ve implemented the first half of this functionality using Microsoft Graph’s change notifications API, allowing me to intercept and read messages as they arrive. However, I’m facing a limitation: since my app doesn’t have permissions to post messages, I can’t use the Graph API’s send capabilities to notify users within the channels or chats.To work around this, I’m considering utilizing a bot. My approach is to have a bot send these notifications to the appropriate chats and channels, using identifiers such as tenant ID, team ID, channel ID, message ID, and chat ID—information I retrieve through the change notifications API.So here are my main questions:Can I use a bot to send messages to various chats and channels on demand, leveraging the IDs obtained from the change notifications API? This would allow my app to handle message interception while the bot takes over in sending the flagged notifications.In my current setup, is there a way to reply to chats or channels directly using the Graph API’s ‘send’ functionality through the app itself? It is related to Application/Delegation Permissions.Thanks Read More