Create Contacts

To create a contact call ->store($data) and pass in an array of details for the contact.

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

$data = [
    'displayName' => 'John Smith',
    'givenName' => 'John Smith',
    'emailAddresses' => [
        [
            'address' => 'j.smith@domain.com',
            'name' => 'John Smith'
        ]
    ]
];
MsGraphAdmin::contacts()->userid($userId)->store($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.