-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Microsoft Graph v6.x.x] Adding a new attendee to an event override the existing attendees. #1898
Comments
Firstly, I add the new attendee to the existing attendees list:
Then, I add the list of current attendees (existing attendees + the new attendee) to the new Event object:
Finally, I sent the new Event object with only one attribute which is the list of the current attendees (existing attendees + the new attendees):
|
Thanks for using the SDK and for reporting this. |
Here's my code - it's working fine for me. I send the new updated list of attendees as a List of Strings of email addresses and call .setAttendees() and it behaves as expected.
|
Thanks for your reply @ccea-dev-team, I suppose that attendeesEmailList elements are the current attendees of the event, retrieved with:
If that's the case, the code seems to be reconstructing (remapping) each attendee into a new Attendee object, which could be inefficient and unnecessary. There are a few potential issues with this approach:
This should not be the case, this is more of a inefficient workaround/hack to overcome the current issue in the 6.x.x version. |
Thanks for your reply, The maximum number of attendees to an event is 5000 (used to be 500) and each attendee object is very small - few bytes each for emails and name etc so it won't cause any memory issues. We maintain a list of the attendees in the application that is calling the webservice - i.e. a list of email addresses of the attendees is stored in a DB table and if the users edits this list through the UI we send the new full list to the web service call. This means we do not have to retrieve the existing Event object to get it's attendee list. As the doc says the only things that are changed in an update is if the value itself is different - so you won't lose any status or type data of an attendee (unless you have manually set that in the update). The practice of sending the full new list means that ms graph will automatically detect who is removed and who is added, whereas in your case it looks like you might have seperate methods for adding and removing attendees and have to check the existing list to determine this? i.e. if you send 1 attendee to the web service how do you know if this is someone to add or someone to remove from the event? Do you have 2 different web service calls for this? Also we have it set up that all events are online meetings and as is says in the docs for OnlineMeetings it needs the full list sent again anyway, so this works for us. Though it is strange that they changed the behaviour so much from version 5. |
In regards to my post above with the documentation of OnlineMeeting saying it "always requires the full list of attendees in the request body" - that bug you have raised states you are going to make sure all collections behave the same. Does this mean you will be changing how OnlineMeeting deals with attendee updates? Also consider that Event objects and OnlineMeeting objects are closely related if the Event has the online meeting flag set. For example if you want to change the co organizer of an online meeting created through an Event you can't do this through the Event object, you first have to get the backing online meeting using the joinurl and set the role on that. |
We're not going to change the behaviour of the underlying REST API as we (my team) don't own the service. |
I am experiencing an issue with the Microsoft Graph Java SDK after upgrading Microsoft Graph
from version 5.80.0 to 6.4.0 where adding a new attendee to an event overrides the previous attendees.
This problem is similar to this issue reported for the .NET SDK.
Terminology Clarification
In the context of my application, when I refer to "subscribing to an event," it means "adding a new attendee to an existing event" using the Microsoft Graph API. So, each subscription action in my application translates to adding a new attendee entry in the event's attendee list through the Microsoft Graph API.
Expected behavior
There is an Event with 0 attendees.
User A subscribed to this event. Total attendees: 1 (User A)
User B subscribed to this event. Total attendees: 2 (User A, User B)
User C subscribed to this event. Total attendees: 3 (User A, User B, User C)
Actual behavior
There is an Event with 0 attendees.
User A subscribed to this event. Total attendees: 1 (User A)
User B subscribed to this event. Total attendees: 1 (User B)
User C subscribed to this event. Total attendees: 1 (User C)
User A subscribed to this event. Total attendees: 1 (User A)
There is an Event with 3 attendees (User A, User B, User C).
User D subscribed to this event. Total attendees: 1 (User D)
My previous working implementation (microsoft-graph: 5.80.0)
Current adapted implementation with issues (microsoft-graph: 6.4.0):
To align with the best practices recommended by Microsoft, I created a new Event object in my application for updating event details, particularly for managing attendees. According to the Microsoft Graph API documentation (updating an event).
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: