Forum Discussion

bcabrera's avatar
bcabrera
Copper Contributor
Apr 24, 2023

Help implementing authentication for MS Teams Bot

My team is planning on building an MS Teams Bot (nodeJS) that would be used to send and schedule notifications to users within a company (Multi-Tenant). 

 

Were planning on implementing the following workflow:

1. have an admin user within an external company install/authorize our app into their MS Teams instance

2. obtain a tokens from the step above that our app would be able to persist

 

3a. admin user would schedule a notification for a future date

4a. once future date arrives, bot is able retrieve persisted tokens (perhaps use refresh token to obtain new) and then send message to specific users

 

3b.  admin user wants to push a notification to specific users

4b. bot is able retrieve persisted tokens (perhaps use refresh token to obtain new) and then send message to specific users

 

Slack offers a flow where a "bot token" is obtained rather than a user token which can then be leveraged to send notifications at a later point. 

 

For some reference, something like this is similar to what we want: https://stackoverflow.com/a/47509000/5431797 

 

Can you point me towards the right direction for making something like this work in MS Teams ?

Resources