Unable to update event with the new set of attendees using MS Graph API

Pranav Ghosh 1 Reputation point
2021-04-27T12:15:29.23+00:00

Through custom SPFx calendar web part, end user has the option to click on the event accept button. After clicking on the accept button, user is added as an attendee in the existing list of attendees and then after the wait of 20 seconds, response status is changed to Accepted using MS Graph API. While adding the user as an attendee, first we are connecting to the organizer's calendar, fetching the event details along with the attendee list. In the existing attendee list object, current user data is added and with this latest attendee list object we again connect to the organizer's calendar to update the existing attendee list to the latest object. As the attendee list object is large (1000+ users), updating the event object with latest attendee list throws error -

Microsoft.Graph.ServiceException: Code: tooManyRetries
Message: More than 3 retries encountered while sending the request.
at Microsoft.Graph.HttpProvider.<SendRequestAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.HttpProvider.<SendAsync>d__18.MoveNext()

Microsoft Graph Calendar API
{count} votes