Skip to content

Cannot get meeting participants #276

Description

@AdamJachocki

I need to get meeting participants and their e-mail addresses. My application has permissions:

  • OnlineMeeting.ReadBasic.Chat
  • OnlineMeetingParticipant.Read.Chat

But GetParticipantsAsync method always throws with 404 Http status code.

Here is my code

[Conversation.MembersAdded]
public async Task OnMembersAdded(IContext<ConversationUpdateActivity> context)
{
    string? teamsMeetingId = context.Activity.GetMeetingId();
    var members = await context.Api.Conversations.Members.GetAsync(context.Activity.Conversation.Id);
    foreach (var member in members)
    {
        var participant = await context.Api.Meetings.GetParticipantAsync(teamsMeetingId, member.Id);
    }
}

and GetMeetingId extension method is just:

public static string? GetMeetingId(this IActivity activity)
{
    if (activity.ChannelData?.Properties != null && activity.ChannelData.Properties.TryGetValue("meeting", out var meetingNode))
    {
        if (meetingNode is JsonElement jel)
        {
            try
            {
                var meetingData = jel.Deserialize<Meeting>(new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
                return meetingData?.Id;
            }
            catch (Exception)
            {
                // Log error if necessary
            }
        }
    }
    return null;
}

TeamsMeetingId now is the meetingId in base64 form. But I tried also context.Activity.Conversation.Id.

Steps:

  1. Create a meeting in Teams
  2. Start the meeting
  3. Add application to the meeting -> then my code is executed.

I tried also:

  1. Create a meeting in Teams
  2. Edit the meeting
  3. Add application to the meeting -> then my code is executed

But each of these steps give the same result - 404 NotFound.

This is real blocker for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions