laravel-microsoft-graph icon indicating copy to clipboard operation
laravel-microsoft-graph copied to clipboard

Can't create a contact with "businessPhones" or "mobilePhone"

Open Badr1600 opened this issue 3 years ago • 0 comments

Whenever I try to create a new contact with businessPhones or mobilePhone this error message is returned.

{"error":{"code":"UnableToDeserializePostBody","message":"were unable to deserialize "}}

$data = [
    'displayName' => $crm_cascontact->surname.' '.$crm_cascontact->givenName,
    'givenName' => $crm_cascontact->givenName,
    'surname' => $crm_cascontact->surname,
    'mobilePhone' => $crm_cascontact->mobilePhone
];

It appears that the store function works only with these parameters:

$data = [
    'displayName' => 'John Smith',
    'givenName' => 'John Smith',
    'emailAddresses' => [
        [
            'address' => '[email protected]',
            'name' => 'John Smith'
        ]
    ]
];

Badr1600 avatar Jan 22 '22 02:01 Badr1600