How to Update Attendees for OnlineMeeting in Graph

hoodv 0 Reputation points
2024-10-22T01:18:34.95+00:00

I used Graph SDK (Microsoft.Graph 5.61.0) to test Update OnlineMeeting with Application Permission and application access policy.

Firstly, I think that I had configured the right Application permission and application access policy, otherwise I couldn't update Subject for OnlineMeeting.

            // Work well
            var updatedMeeting = new OnlineMeeting
            {
                Subject = "Updated Subject",
            };

            var newMeeting = await client.Users[userId].OnlineMeetings[onlineMeetingId].PatchAsync(updatedMeeting);
            // Subject of newMeeting became "Updated Subject" 

But I ran into a problem when updating attendees. I added two attendees as participants initially;

then I try to remove the two attendees onetime, the attendees list didn't have any change;

so I just try to remove one attendee, it successed, now just one attenddee in the meeting;

and then I try to remove last one attendee, the attendees list didn't have any change anymore.

            var theMeeting = await client.Users[userId].OnlineMeetings[onlineMeetingId].GetAsync();
			
			// Not work
            var updatedMeeting = new OnlineMeeting
            {
                Participants = new MeetingParticipants
                {
                    Attendees = new List<MeetingParticipantInfo>(),
                }
            };

            var newMeeting = await client.Users[userId].OnlineMeetings[onlineMeetingId].PatchAsync(updatedMeeting);
            // the last attendee still in attendee list of newMeeting

and I also test the api in postman with below, it is the same result with 200 OK.

{
    "participants": {
        "attendees": [
        ]
    }
}

What is the reason why my code is not working properly, please enlighten me, thank you very much

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,196 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,135 questions
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,298 questions
{count} votes

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.