Set attendees to accepted when creating a calendar event with Graph API

Peter Torok 30 Reputation points
2023-01-11T13:51:41.8133333+00:00
Hi everyone!
We’re developing an application for a client that needs to create calendar events. For every event we invite attendees and we want the events to be accepted by every attendee by default. We are setting every related field like this:
"responseStatus": {
                    "response": "accepted"
                },
"responseRequested": false,
"attendees": [
                    {
                        "type": "required",
                        "emailAddress": {
                            "name": "Ex Ample",
                            "address": "******@domain.onmicrosoft.com"
                        },
                        "status": {
                            "response": "accepted",
                             "time": "2023-01-01T00:00:00Z"
                        }
                    }
                ],
We tried setting the responseRequested field to true or false and providing a timestamp on the attendee’s status or removing it but in all cases it just seems to require action from the attendee. Can we somehow make the events accepted on the attendee’s calendar like in this screenshot for the “Advances multi-tasking Graphical User Interface” event instead of the “Configurable optimizing secured line” event ?



Microsoft Security | Microsoft Graph
{count} votes

2 answers

Sort by: Most helpful
  1. HarmeetSingh7172 4,826 Reputation points
    2023-01-11T23:50:04.4266667+00:00

    Hello @Peter Torok ,

    Thanks for reaching out!

    As per my understanding, it is not possible to create calendar event and accept that event (by default) for some other user. We can't use responseStatus property in request body while creating an event, as it's a response type property (We get this property in API response and this property is not meant to be use in request body). Similarly, status property inside Attendees property array is also a response type property and can't be used in request body.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

  2. Peter Torok 30 Reputation points
    2023-01-12T10:02:11.8766667+00:00

    Hi @HarmeetSingh7172 !
    Thanks for your quick and detailed feedback. This is what we suspected. So in our understanding, the only option left is to call the accept method of the event. The concern with this approach is that we are creating tens of thousands of events, and we are concerned, on top of that, calling the method would put a massive load on the resources, and we would hit the limits of the api even faster. Could you please share your thoughts on how would this approach influence the resources?
    Thanks, Peter

    0 comments No comments

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.