Update Contact

To update a contact call ->update($data) and pass in the id of the contact and an array of details to be changed.

To see all contact properties look at https://docs.microsoft.com/en-us/graph/api/resources/contact?view=graph-rest-1.0

In this example, only the email address will be changed

$data = [
    'emailAddresses' => [
            'address' => 'j.agent@domain.com',
            'name' => 'John Agent'
MsGraphAdmin::contacts()->userid($userId)->update($id, $data)

Help support the blog so that I can continue creating new content!

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.