question

ChakravarthiT-8936 avatar image
0 Votes"
ChakravarthiT-8936 asked saldana-msft edited

Send OneOnOne Teams Chat message through Graph API from .NET Core WebAPI without user signed in

I have a requirement to send a chat message with parameters (email and message content) using Graph API from my .Net Core Web API.
Without any signed in user I have to send the chat message. Is it possible with Graph API? If not, is there any alternatives?

It is working in Graph explorer but getting Unauthorized or Unknown Error.

Please help me on this.

dotnet-csharpdotnet-aspnet-core-generalmicrosoft-graph-sdk
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.

1 Answer

miwan2-msft avatar image
0 Votes"
miwan2-msft answered ChakravarthiT-8936 commented

Hi, @ChakravarthiT-8936,
From official document, Microsoft Graph must send chatMessage in a channel or a chat. And I think SignalR is a better choice for the boardcast requirement.

The SignalR Hubs API enables you to call methods on connected clients from the server. In the server code, you define methods that are called by client. In the client code, you define methods that are called from the server. SignalR takes care of everything behind the scenes that makes real-time client-to-server and server-to-client communications possible.

  Clients.All.broadcastMessage(name, message);


If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
If the answer 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.


Best Regards,
Michael Wang

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

Thank you Michael.
The scenario is some client application calls our web api say SendMessage(Tony.stark@organization.com, message) internally send the message to user email teams account or app. So SignalR works in this scenario? Let me know other options.

0 Votes 0 ·

@miwan2-msft , any updates or suggestions?

0 Votes 0 ·