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)

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

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