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#?
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://docs.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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.