question

NitinS-1896 avatar image
0 Votes"
NitinS-1896 asked saldana-msft edited

Send messages on teams on behalf of app

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).

Can i achieve it by creating teams app or bot?

Thanks.

office-teams-app-devmicrosoft-graph-teamworkmicrosoft-graph-search
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NitinS-1896

Our forum is mainly focused on the general issue of Microsoft Teams troubleshooting. According to your description, your issue is more related to development of Teams API, which we do not support. So I will add teams-app-dev tag to your thread. Hope you get better response!

0 Votes 0 ·

@NitinS-1896

Just checking in to see if the information was helpful. If you have any further updates on this issue, please feel free to post back.

0 Votes 0 ·

@NitinS-1896

Just checking in to see if ShwetaChoudhary's suggestion was helpful. If you have any further updates on this issue, please feel free to post back.

0 Votes 0 ·

1 Answer

ShwetaChoudhary-8869 avatar image
0 Votes"
ShwetaChoudhary-8869 answered nitinsharma-0218 commented

@NitinS-1896 It's a good idea to build Bot and send notifications for your scenario. You can use Proactive message to send message.
Also please note that in order to send message, your Bot needs to be installed for each user (since application permissions are not yet there).

You can install the app in personal scope. You can use Subscriptions for /chats/allMessages -- all chat messages in organization and then notify user in 1:1 using bot.

Unfortunately at the moment, you cannot use Microsoft graph for this. Being said that, please file user voice for your scenario so that it could be considered for future implementations.

Please upvote if this helps. Thanks!


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thankyou very much for help @ShwetaChoudhary-8869 .

There are lot of ways are mentioned in doc to create a bot.For now i only need to create a bot which can send messages into channels(one-way). I dont want command functionallity etc right now.Can you please suggest me where should i start create a bot for this functionallity. Do i need to create a sample bot first and then integrate proactive message in it?

Thanks

0 Votes 0 ·

Refer to this sample. Here bot has been created using Bot Framework, it shows how to send proactive messages to users by capturing a conversation reference. Hope this helps.


1 Vote 1 ·