Jun 07 2021 12:20 AM - edited Jun 07 2021 12:21 AM
Hi,
I am able to send send messages on a team's channel by using
POST- https://graph.microsoft.com/v1.0/teams/{team_id}/channels/{channel_id}/messages
But this api is sending messages on behlaf of user.Is there any way i can send these messages on behlaf of application.I mean instead of user's name my application name will reflect.
Nitin -> Hi this is nitin's app. WRONG
NitinApp -> Hi this is nitin's app RIGHT
Is there any way to achieve it?
My task is to create a company app/bot which can send notifications to our client's teams.Every client has its own microsoft/teams organization account. So if any client wants to get notify from our app first he will have to authenticate our app and set a channel.After that our app will send messages to that channel(Not on behalf of user).
For example- Just like a slack app.We have a slack app which can send daily report notifications to our clients.How can i achieve it in Teams?
Can i achieve it by creating Teams app or bot?
Pls help..
Thanks.
Jun 07 2021 01:17 AM
@nitin1005 There are lots of ways to do this
The way that's most similar to Slack would be to use a Webhook connector, right click on a channel to get to connectors and choose incoming webhook, you;ll get a web url that you post messages to and they will appear in that channel as being from the app.
Another alternative is to develop a Bot to send pro-active messages to a channel, while this is harder to develop it's perhaps easier to deploy to multiple tenants. More on Bots -> Send proactive messages - Teams | Microsoft Docs
Jun 07 2021 03:32 AM
@Steven Collier Thanks for your help.
I have few more queries for you.
1- What type of accounts do i need for this?
2- Do i have to take subscription of office365 and azure for whole development(creation to distribution of app ) or can i do this by using basic accounts?
Thanks.
Jun 07 2021 04:54 AM
1. No account, when you create the connector it can post to the channel, there isn't an account or authentication. In effect the webhook url includes a unique key used for authentication.
2. Not sure I understand.