Forum Discussion

NasarKhan's avatar
NasarKhan
Copper Contributor
Jan 14, 2026

How to add a Teams Media Bot in an online meeting.

I am currently developing a Teams Media Bot designed to join Microsoft Teams meetings, record sessions, and perform subsequent analysis. The bot is intended to participate as a visible attendee in meetings. Below is an overview of the development environment and the key issues encountered:

Current Implementation:

Graph API with Application Permissions: The bot joins meetings as an application.

Azure Bot Service: Facilitates communication between the bot and Microsoft Teams.

Deployment: Hosted on an Azure VM.

Note: No resource account is currently associated with the bot.

Issue #1: Delayed Join Scenario The bot successfully joins and appears as a participant when it initiates the meeting and other participants join afterward. However, if participants are already present and the bot attempts to join later, the logs indicate successful entry, but the bot does not appear in the participant roster, nor does it begin recording. Interestingly, the bot becomes visible only after all other participants leave the meeting. The root cause of this behavior remains unclear.

Issue #2: External User Access Constraints When the bot is active in a meeting and the lobby bypass setting is not configured to "Everyone," external users encounter difficulties joining. Although they receive meeting invitations and can initiate a join attempt, they are redirected to a new meeting instance instead of entering the ongoing session. This issue resolves once all participants leave the meeting, allowing external users to join successfully.

Attempted Resolution: I explored creating a resource account and assigning the bot’s application ID to that account. However, I encountered authentication challenges when attempting to authorize the bot on behalf of the user account.

Request for Guidance: I would appreciate any insights or recommendations to address these issues, particularly regarding the bot’s delayed visibility and the constraints affecting external user access.

2 Replies

  • @NasarKhan - Thanks for bringing this issue to our attention. 

    Root Causes of the issues

    Issue #1 (Bot Not Visible When Joining Active Meeting):

    • The bot does not properly negotiate media with current participants.
    • The call establishment handshake is incomplete before the bot tries to record.
    • Firewall or port restrictions on the Azure VM may be blocking media streams.

    Issue #2 (External Users Redirected to New Meeting):

    • The bot joins using an application identity without the necessary tenant context.
    • Without a resource account, the bot cannot interact with lobby or admission policies.
    • External users cannot be admitted because the bot lacks the required identity and permissions.

    Solutions
    1: Delayed Join

    1. Separate the calling webhook from the messaging endpoint in Azure Bot Service.
    2. Configure the media platform with the correct VM public IP and FQDN.
    3. Ensure required ports are open on the Azure VM:
      • TCP 443, 8445
      • UDP 12332-12432 for media streams
    4. Wait for the "call established" state before starting the recording process.
    5. Verify the SSL certificate on the VM FQDN for secure signaling
      .

    2: External User Access

    1. Create a resource account using PowerShell:
      • Run New-CsOnlineApplicationInstance
      • Link it to your bot’s App ID
    2. Assign an application access policy globally or to specific users.
    3. Update the bot to join meetings with the resource account identity instead of app-only authentication.
    4. Assign appropriate Teams meeting policies to the resource account for recording and lobby permissions.

     

    Please let us know if you have any other query here.

Resources