question

CarlOgden-7135 avatar image
0 Votes"
CarlOgden-7135 asked CarlZhao-MSFT answered

PHP Microsoft Graph - how to update an event

Hi

I have the following code to create an event:-

                         $newEvent = [
                             'subject'                    => $event_subject,
                             'isReminderOn'               => $isReminderOn,
                             'reminderMinutesBeforeStart' => $reminderMinutesBeforeStart,
                             'isAllDay'                   => $isAllDay,
                             'showAs'                     => $showAs,
                             'sensitivity'                 => $sensitivity,
                             'body'                          => [
                                 'content' => $notes,
                                 'contentType' => 'text'
                             ],
                             'start' => [
                                 'dateTime' => $app_start_date,
                                 'timeZone' => $viewData['userTimeZone']
                             ],
                             'end' => [
                                 'dateTime' => $app_end_date,
                                 'timeZone' => $viewData['userTimeZone']
                             ],
                             'attendees'     => $attendees,
                             'transactionId' => $appointment_id,
                         ];
    
 $response = $graph->createRequest('POST', '/me/events')
                         ->attachBody($newEvent)
                         ->setReturnType(Model\Event::class)
                         ->execute();

I mark the created event with our internal transactionId.

How do I then update this event with either a change of date/time/subject/notes?

I've been unable to find example code to help me solve this issue.

Kind regards in advance
Carl.

microsoft-graph-applications
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Dear @CarlOgden-7135, I will researching it and reply to you later.

0 Votes 0 ·

1 Answer

CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered

I am not familiar with PHP. As far as I know, Microsoft does not provide a PHP sample of the update event. However, code snippets in other languages are provided. You can refer to these code snippets to use PHP update events, their logic is the same.

Microsoft Graph SDK for PHP.



If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.