Microsoft Teams Bot App, not receiving teams meeting participants join/leave events

Ron Farkash 0 Reputation points
2025-03-31T07:14:18.1733333+00:00

Hi,

I am using this sample by meetings-events to try and get my bot application to react to meeting started, meeting ended, and participant join/leave events.

Here is my manifest:

{
  "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
  "manifestVersion": "1.19",
  "version": "1.2.11",
  "id": "{bot_id}",
  "developer": {
    "name": "Test App",
    "websiteUrl": "https://{my_domain}.com",
    "privacyUrl": "https://{my_domain}/privacy",
    "termsOfUseUrl": "https://{my_domain}/termsofuse"
  },
  "icons": {
    "color": "color.png",
    "outline": "outline.png"
  },
  "name": {
    "short": "Test App",
    "full": "Test App Full Name"
  },
  "description": {
    "short": "Test App Description",
    "full": "Test App Full Description"
  },
  "accentColor": "#FFFFFF",
  "bots": [
    {
      "botId": "{bot_id}",
      "scopes": [
        "personal",
        "team",
        "groupChat"
      ],
      "needsChannelSelector": false,
      "isNotificationOnly": false,
      "supportsFiles": false,
      "commandLists": [
        {
          "scopes": [
            "personal",
            "groupChat",
            "team"
          ],
          "commands": [
            {
              "title": "SendNotification",
              "description": "Sends targeted meeting notification to selected members."
            }
          ]
        }
      ]
    }
  ],
  "configurableTabs": [
    {
      "configurationUrl": "{my_domain}/tab",
      "canUpdateConfiguration": true,
      "scopes": [
        "team",
        "groupChat"
      ],
      "context": [
        "meetingSidePanel",
        "meetingStage"
      ]
    }
  ],
  "permissions": [
    "identity",
    "messageTeamMembers"
  ],
  "validDomains": [
    "{my_domain}"
  ],
  "meetingExtensionDefinition": {
    "supportsStreaming": true,
    "supportsAnonymousGuestUsers": true
  },
  "webApplicationInfo": {
    "id": "{bot_id}",
    "resource": "api://{my_domain}/botid-{bot_id}"
  },
  "authorization": {
    "permissions": {
      "resourceSpecific": [
        {
          "name": "OnlineMeetingNotification.Send.Chat",
          "type": "Application"
        },
        {
          "name": "OnlineMeeting.ReadBasic.Chat",
          "type": "Application"
        },
        {
          "name": "ChannelMeeting.ReadBasic.Group",
          "type": "Application"
        },
        {
          "name": "OnlineMeetingParticipant.Read.Chat",
          "type": "Application"
        },
        {
          "name": "ChannelMeetingParticipant.Read.Group",
          "type": "Application"
        }
      ]
    }
  }
}

  async onTeamsMeetingStart(context){
    // console.log(context)    
    console.log('meeting started')
  }

  async onTeamsMeetingEnd(context){
    console.log('meeting ended')
  }

  async onTeamsMeetingParticipantsJoin(context){
    console.log('participant joined')
  }
 
  async onTeamsMeetingParticipantsLeave(context){
    console.log('participant left')
  }
  this.onTeamsMeetingParticipantsJoin(async (context, next) =>{
      console.log('participant joined')
      await next();
    });
  this.onTeamsMeetingParticipantsJoinEvent(async (context, next) =>{
      console.log('participant joined2')
      await next();
    });
   this.onTeamsMeetingParticipantsLeave(async (context, next) =>{
      console.log('participant joined')
      await next();
    });
    this.onTeamsMeetingParticipantsLeaveEvent(async (context, next) =>{
      console.log('participant joined2')
      await next();
    });

  1. I uploaded my manifest.json through the Teams Admin Center.
  2. I added my Bot Application to a chat of a meeting I scheduled with myself.
  3. I successfully receive events like Meeting Start and Meeting End.
  4. I noticed in the README.md file of the sample that it says:

"You need to my bot to subscribe to real-time meeting events such as participant join/leave through the "Developer Portal", and I need to manually tick some check boxes and press save, along with having "OnlineMeetingParticipant.ReadChat" RSC permission."

I am facing few issues:

  1. I couldn't find my bot application inside the developer portal, not under "Apps" or "Tools" -> "Bot Management"
  2. I tried pressing "Import an app" thinking it would synchronize the developer portal, but "Tools" -> "Bot Management" doesn't contain my bot application, so I can't turn on the "real-time meeting events"
  3. I tried creating an application using the developer portal, and when I turn on real-time meeting events for "Participant join" and "Participant leave", I get an error

"Failed to update meeting event subscriptions", the status code is 500, the response from that request is completely empty.

  1. I tried looking for an alternative way to receive "Participant join/leave" events but it seems like the only way is to do it manually through the developer portal?

what is the difference between Meeting Started/Ended and participant join/leave events? if I receive meeting started/ended in real-time why can't I receive participant join/leave in the same manner?

why do I have to go through extra manual steps (that don't work for me) to turn on these two extra events?

do I have to enter each organization's developer portal and turn on this "real-time meeting events"? even if I'm deployed on hundreds of organizations?

is there an alternative method to receiving those events straight to my bot application which does not require me to interact with the developer portal? the developer portal seems very flakey considering I can't get my bot application to appear in the "Bot Management" section...

I'd love your help on this issue, thank you very much in advance!

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,845 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 3,896 Reputation points Microsoft External Staff
    2025-04-01T10:10:11.69+00:00
    1. Why Can't You See Your Bot in the Developer Portal?

    The Developer Portal for Teams is used to manage apps and bots. If your bot doesn't appear in the Developer Portal, it could be due to one of the following reasons:

    • The bot was created outside the Developer Portal (e.g., via Azure Bot Service or manually through the Teams Admin Center).
    • The app manifest was uploaded directly to the Teams Admin Center, which doesn't automatically sync with the Developer Portal.

    Solution:

    • Import Your App into the Developer Portal:
      1. Go to the Teams Developer Portal.
        1. Click Import an app and upload your app's manifest file (manifest.json).
          1. Once imported, your bot should appear under Apps and Tools > Bot Management.

    1. Why Can't You Enable Real-Time Meeting Events?

    The error "Failed to update meeting event subscriptions" (status code 500) when enabling real-time meeting events for "Participant join" and "Participant leave" is likely due to:

    • Missing Resource-Specific Consent (RSC) permissions in your app registration.
    • A misconfiguration in your app manifest or Azure AD app registration.

    Solution:

    Ensure RSC Permissions Are Configured Correctly:

    • In your app manifest, ensure the following RSC permissions are included under authorization.permissions.resourceSpecific:{  "name": "OnlineMeetingParticipant.Read.Chat",  "type": "Application"},{  "name": "ChannelMeetingParticipant.Read.Group",  "type": "Application"}
      • These permissions allow your bot to subscribe to participant join/leave events.
      Grant Admin Consent for RSC Permissions:
      - Go to **Azure Active Directory > App Registrations > Your Bot App**.
      
         - Under **API Permissions**, ensure the RSC permissions are listed and grant admin consent.
      
         **Enable Real-Time Meeting Events in the Developer Portal**:
      
            - After ensuring the above configurations, go back to the Developer Portal.
      
               - Navigate to **Tools > Bot Management > Real-Time Meeting Events**.
      
                  - Enable the "Participant join" and "Participant leave" events and save.
      

    1. Why Do You Need Extra Steps for Participant Join/Leave Events?

    The Meeting Started/Ended events are general meeting lifecycle events that don't require additional configuration. However, Participant Join/Leave events are more granular and require real-time meeting subscriptions, which are managed through the Developer Portal.

    This additional step is required because:

    • Real-time meeting events involve higher resource usage and permissions.
    • Microsoft requires explicit consent and configuration to enable these events.

    1. Do You Need to Enable Real-Time Events for Each Organization?

    No, you don't need to manually enable real-time meeting events for each organization. Once your bot is configured with the correct RSC permissions and real-time meeting events are enabled in the Developer Portal, the bot can handle these events across all organizations where it is installed.

    However, the following conditions must be met:

    • The bot must be installed in the meeting or team where the events are expected.
    • The tenant admin must consent to the RSC permissions when installing the bot.

    1. Alternative Methods to Receive Participant Join/Leave Events

    If the Developer Portal is not working for you, there is currently no alternative method to directly subscribe to Participant Join/Leave events without using the Developer Portal. However, you can try the following:

    Use Microsoft Graph API for Meeting Events:

    • You can use the Microsoft Graph API to poll for meeting participant data periodically.
      • Example: Use the /onlineMeetings/{meetingId}/participants endpoint to get the current list of participants.
      Documentation: Get meeting participants Raise a Support Ticket:
      - If the Developer Portal is not functioning as expected (e.g., 500 errors), raise a support ticket with Microsoft to resolve the issue.
      

    1. Why Can't You Receive Participant Join/Leave Events Like Meeting Started/Ended?

    The Meeting Started/Ended events are part of the standard bot event model and don't require real-time subscriptions. In contrast, Participant Join/Leave events are part of the real-time meeting events feature, which requires explicit configuration and RSC permissions.

    Reference Document-
    1.https://learn.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/real-time-media-concepts
    2.https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent
    3.https://learn.microsoft.com/en-us/graph/api/resources/onlinemeeting?view=graph-rest-1.0


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.