Category : microsoft-graph-api

415 Unsupported Media Type Date: Wed, 21 Jul 2021 04:58:47 GMT Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8 Cache-Control: private Transfer-Encoding: chunked Strict-Transport-Security: max-age=31536000 request-id: 64efc176-cf5d-4e4a-bc56-34d4fad3fc40 client-request-id: 64efc176-cf5d-4e4a-bc56-34d4fad3fc40 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"BY1PEPF00003215"}} {"error":{"code":"RequestBodyRead","message":"A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) ‘Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, ..

Read more

I’m having a perplexing problem using Microsoft Graph API. I want to get a list of Todo lists and add a task to the default one. My code is: $response = $graph->createRequest(‘GET’,’/me/todo/lists’) ->setReturnType(ModelTodo::class) ->execute(); I get a " Class ‘MicrosoftGraphModelTodo’ not found" error. If I replace Todo::class with Event::class, it works. If I replace it ..

Read more

I am trying to modify a user using Microsoft API $graph = new Graph(); $graph->setAccessToken($accessToken); $graph->createRequest(‘PATCH’, "/users/*USER_ID*") ->attachBody(array("officeLocation" => $code)) ->execute(); I get the following error: Cannot convert a primitive value to the expected type ‘Edm.String’ Any suggestions what can cause this issue? Sourc..

Read more

I’m using the php SDK for microsoft graph to upload files to sharepoint. From time to time, the createRequest command hangs, and I’m not sure how to debug it. When I make a simple request, (e.g GET /me) it works. $graph = new Graph(); $graph->setAccessToken($access_token); $user = $graph->createRequest("GET", "/me") ->setReturnType(ModelUser::class) ->execute(); // This works. $user ..

Read more

I have problem implementing azure SSO to my website. Azure AD configuration use certificate instead of secret. Everything looks to be working, but https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token returns Bearer token which contains only app information and I’m trying to get user information who have logged in. Can anyone provide me some information and tips how to obtain user ..

Read more

I am trying to delete an event using Microsoft Graph API. My issue is that I couldn’t delete an event even the response returns success. (regarding the official doc, success returns null) My technical stack is CakePHP v4.x and I code like the following. $http = new Client(); $appToken = $this->getRequest()->getSession()->read(‘appToken’); if ($this->request->is(‘ajax’)) { $this->autoRender ..

Read more