Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if a meeting or a call is currently going in Microsoft Teams

I would like to be able to detect if a meeting or a call is currently going on in Microsoft Teams.

Is there a way to detect if a call or a meeting is going on in Microsoft Teams using C#?

like image 759
fs_tigre Avatar asked Oct 14 '25 15:10

fs_tigre


1 Answers

There is no such API to detect if a call or a meeting is going on in Microsoft Teams.

To achieve your requirements, we recommend you to raise feature request here.

Alternatively, you can get real-time Teams meeting events using below API: https://learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/api-references?tabs=json#get-real-time-teams-meeting-events-api

The user can receive real-time meeting events. As soon as any app is associated with a meeting, the actual meeting start and end time are shared with the bot.

The Activity object in TurnContext contains the payload with the actual start and end time. Real-time meeting events require a registered bot ID from the Teams platform. The bot can automatically receive meeting start or end event by adding ChannelMeeting.ReadBasic.Group in the manifest.

Meeting Start Event:

 protected override async Task OnTeamsMeetingStartAsync(MeetingStartEventDetails meeting, ITurnContext<IEventActivity> turnContext, CancellationToken cancellationToken)
{
    await turnContext.SendActivityAsync(JsonConvert.SerializeObject(meeting));
}

Meeting End Event:

protected override async Task OnTeamsMeetingEndAsync(MeetingEndEventDetails meeting, ITurnContext<IEventActivity> turnContext, CancellationToken cancellationToken)
{
    await turnContext.SendActivityAsync(JsonConvert.SerializeObject(meeting));
}

Sample Code Link

like image 135
Prasad-MSFT Avatar answered Oct 17 '25 03:10

Prasad-MSFT