question

NITINSHARMA-8665 avatar image
0 Votes"
NITINSHARMA-8665 asked SharonZhao-MSFT edited

sending messages on teams as an application

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

Thanks.

office-teams-windows-itprooffice-teams-app-devmicrosoft-graph-notifications
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.

SharonZhao-MSFT avatar image
0 Votes"
SharonZhao-MSFT answered SharonZhao-MSFT commented

@NITINSHARMA-8665,

It isn’t supported on behalf of application when sending message in channel.

The following picture is a screenshot of official document. It can explain this.
102254-image.png


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (33.7 KiB)
· 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.

Hi @SharonZhao-MSFT thanks for your reply.
Is there any alternative 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.

0 Votes 0 ·

@NITINSHARMA-8665,
As we are mainly responsible for general question of Microsoft Teams, your requirement is more related to app development. I will add office-teams-app-dev tag for further support. Thanks for your patience and understanding.

0 Votes 0 ·
JagadeeshLankiReddy-5847 avatar image
0 Votes"
JagadeeshLankiReddy-5847 answered SharonZhao-MSFT commented

Hi @NITINSHARMA-8665, you can create a bot and use teamsconversation bot sample for your scenario.


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

@NITINSHARMA-8665,
Do you try JagadeeshLankiReddy-5847's suggestion?
If this suggestion is helpful, please feel free to accept it as answer.

0 Votes 0 ·

@NITINSHARMA-8665,
Haven't received your update for a long time, any update now?
If the above suggestion helps, please be free to mark it as answer for helping more people.

0 Votes 0 ·