Retrieving audio stream data using MS Teams bot with RSC permissions
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://video2.skills-academy.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...)