Retrieving audio stream data using MS Teams bot with RSC permissions

Aleksei Korota 0 Reputation points
2024-09-19T09:02:55.42+00:00

Task: call the bot or add it to the call so that the bot listens to the audio stream. If we follow the guides and give the application permission in the Graph API - Calls.AccessMedia.All everything works as expected, the callback request arrives, and the handlers are triggered, so the bot can answer the call;

_communicationsClientProvider.Client.Calls().OnIncoming += CallsOnIncoming  _communicationsClientProvider.Client.Calls().OnUpdated += CallsOnUpdated  

However, according to the documentation, it is possible to use a different approach and not grant such broad rights to the application - https://learn.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/registering-calling-bot#rsc -permissions-for-calls and give only RSC permissions for getting audio stream:

Calls.AccessMedia.Chat Access media streams in calls associated with this chat or meeting.

However, if you leave only RSC Permissions, then there is no way to call the bot (1 to 1 call), and if you add it to a meeting, then it is not clear how to receive a stream of the call (maybe I need to add bot to the call somehow after adding it to the meeting). Is it possible to access the real time audio stream of a call using only RSC Permissions? And if yes, how to achieve that with .Net?

I tried to remove Graph API permissions and setup RSC only. Then, when I call the bot, I get the audio message (you can't talk to this bot yet...)

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,980 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,209 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.