Send Microsoft Teams message from Application to User

Certified Lead Developer

Hi, looking for some guidance on how to send Teams messages from our App directly to a user.

We tried using the Teams Plugin but found we were limited by only being able to send messages with authentication Authorisation Code Grant (Delegated Permissions), this was forcing each user to individually authenticate from the app, which isn't what we're looking for.

We want to send chat messages directly from a System(Application) user. (I think this is a limitation of Teams rather than the plugin itself).

We have found the below link on "Activity Notifications" in Teams rather than chat messages, has anyone had any experience with this? I'm just looking for confirmation that this method will achieve the results before I go down the rabbit hole.

learn.microsoft.com/.../teams-send-activityfeednotifications

Or if not, does anyone know any other way for us to achieve the desired behaviour?

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • Hey! The main issue is that teams doesn’t let an app just send messages as a regular user without each person signing in. The usual workaround is to create a bot or service account in Teams and have your app send messages through that bot. That way, you can send 1:1 messages or chat messages without needing each user to authenticate.

    If you don’t need full chat messages and just want to ping users with alerts, using the activity feed notifications API is a simpler and fully supported option. It won’t create a normal chat thread, but it’s perfect for sending system-to-user notifications.

    So basically, for “real” messages, go bot route; for simple notifications, activity feed works great.

Reply
  • Hey! The main issue is that teams doesn’t let an app just send messages as a regular user without each person signing in. The usual workaround is to create a bot or service account in Teams and have your app send messages through that bot. That way, you can send 1:1 messages or chat messages without needing each user to authenticate.

    If you don’t need full chat messages and just want to ping users with alerts, using the activity feed notifications API is a simpler and fully supported option. It won’t create a normal chat thread, but it’s perfect for sending system-to-user notifications.

    So basically, for “real” messages, go bot route; for simple notifications, activity feed works great.

Children
No Data