$graph = new Graph();
$graph
->setBaseUrl("https://graph.microsoft.com/")
->setApiVersion("v1.0")
->setAccessToken($_SESSION['access_token']);
return $me = $graph->createRequest("get", "/me/manager")
->addHeaders(array("Content-Type" => "application/json"))
->setReturnType(Model\User::class)
->setTimeout("1000")
->execute();
Отображается ошибка
HTTP / 1.1 403 Forbidden Cache-Control: частное Transfer-Encoding:
chunked Content-Type: application / json request-id:
b343d567-e1e2-4f46-8bd1-d80d27cf28ab идентификатор запроса клиента:
b343d567-e1e2-4f46-8bd1-d80d27cf28ab x-ms-ags-диагностика:
{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"SliceC","Ring":"3","ScaleUnit":"001","Host":"AGSFE_IN_18","ADSiteName":"SEA"}}
Duration: 35.3167
Strict-Transport-Security: max-age=31536000
Date: Wed, 31 Oct 2018 11:57:45 GMT
{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"request-id": "b343d567-e1e2-4f46-8bd1-d80d27cf28ab",
"date": "2018-10-31T11:57:46"
}
}
}