Я могу успешно создавать группы в PHP с помощью Microsoft Graph v1.0.
Однако при попытке обновить ту же группу я получаю следующую ошибку:
В настоящее время запрос не поддерживается для набора целевых объектов
Как я могу устранить эту ошибку?
код
$url = "https://graph.microsoft.com/v1.0/groups/104e2256-6bfc-40e8-a357-fa76cc36eb64";
$body = "{'allowExternalSenders': false, 'visibility': 'Private'}";
$headers = array(
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch);
curl_close($ch);
$json = json_decode($output, true);
print var_dump($json);
выход
["error"]=> array(3) {
["code"]=> string(10) "BadRequest"
["message"]=> string(65) "The request is currently not supported on the targeted entity set"
["innerError"]=> array(2) {
["request-id"]=> string(36) "26a5413a-17cc-4de8-b97d-00ffbc080098"
["date"]=> string(19) "2019-01-04T17:03:05"
}
}