Dear @Eedula, Pavan Kalyan Reddy,
Thank you for reaching out to the Microsoft Q&A Community.
I can tell from your question that you are working on a very advanced and challenging project. Your experience with the Microsoft Graph API is a well-documented challenge, as getting direct access to raw audio streams requires a very specific setup, and I am so sorry that you've hit a roadblock with the official sample code. What you're attempting to build is a real-time media bot, and it's completely understandable that this is proving to be a complex task.
From my research, there are two main approaches to this:
1.Using Microsoft Graph API
For real-time audio interaction, you can't use a standard bot. You must build an application-hosted media bot with the Microsoft.Graph.Communications.Calls.Media .NET library. This type of bot receives a live stream of audio (and video) frames, allowing you to perform real-time processing, like transcription or natural language processing, as it happens.
The key requirements for this approach are very specific and are often the reason why samples fail:
- The bot must be deployed on a Windows Server operating system, either on-premises or in Azure.
- It requires specific port ranges to be opened for media traffic.
- It must use the Microsoft.Graph.Communications.Calls.Media SDK, which provides a "socket-like" API for accessing the raw media streams.
For references:
Real-time Media Call & Meeting for Bots - Teams | Microsoft Learn
Build Application-hosted Media Bots - Teams | Microsoft Learn
Bots for Teams Calls and Online Meeting - Teams | Microsoft Learn
2.Using Azure Communication Services (ACS)
You can build a bot that joins a Teams meeting using the ACS Call Automation SDK, which is specifically designed for server-based intelligent calling workflows.
Instead of a phone number, your bot would join the Teams meeting using a Teams user's ID or an ACS identity. From there, you can use the SDK to access and stream the audio to a server (often via a WebSocket), which then performs the processing. This approach is powerful because it allows for full interoperability with Teams meetings and can be integrated with various AI services.
Microsoft's documentation provides a quickstart guide for setting up this kind of real-time audio streaming. It demonstrates how to use the SDKs to receive and process the audio stream from a call.
For reference: Call Automation Teams Interop overview - An Azure Communication Services concept document | Microsoft Learn
Given the complexity you're experiencing with this issue, it's a matter that is beyond what we can provide here in the forum. For issues like this, I strongly recommend raising a support ticket with the Microsoft Support team. They have the necessary tools and permissions and can offer targeted solutions that go beyond what we can provide here in the forum. Therefore, I strongly recommend raising a support ticket with the Microsoft Support team. They can initiate a live troubleshooting session and, if necessary, escalate your case to a specialized team equipped to handle such issues.
As an admin in your organization, to create a Support ticket, you can go to Microsoft 365 admin center
- Please follow this article: Get support - Microsoft 365 admin | Microsoft Learn.
- On right bottom corner click on "Help & support"
- After that choose the "Contact support"
- Fill out the required information in the form, including a description of the issue you are experiencing.
- Click on the "Create" button to submit your request. Which will give you a ticket number.
- Once your request is submitted, a support engineer will be assigned to your case and will contact you to provide assistance.
I'm sincerely sorry that I can't assist you further at this stage, but this matter may be beyond our current capacity. Once you have a Support Ticket ID, you can share it with me here in the Microsoft Community via a private message. This will allow me to track the progress and ensure your case receives the necessary attention.
I will keep this post open to see if other professionals in the community have a different solution.
Thank you for your patience and understanding. Have a wonderful weekend!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.