How to Update Attendees for OnlineMeeting in Graph
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