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:
have an admin user within an external company install/authorize our app into their MS Teams instance
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, namely, what would I need to do to have a company admin user accept scopes on behalf of everyone, get a token, store the token, leverage the token for future use as needed without needing users to signin (The Bot has no UI component) ?