Open flohw opened 7 months ago
I am facing the same issues with application permissions using client secret route. I tried doing the directory creation I needed in a throwaway C# console app and it worked perfectly, so despite it being a error response from server it appears to be something wrong with how php client is sending request.
If I have time later this week I'll try and pull out a network sniffer to catch the requests and see if I can find the difference between my throwaway C# app and my php code.
Hi again,
Sorry for two issues in a row...
I had a method to rename a drive item. I used to call
$graph->createRequest('PATCH', 'drives/{drive-id}/items/{drive-item-id}')->attachBody(json_encode(['name' => 'new name']))->execute();
to rename a drive item.I saw the new method with the v2 which seems to be :
But I get an exception with the only indication :
Invalid request
which is not really useful... I have aClientCredentialCertificateContext
and I used to authenticate with that same certificate method. I do not provide any scopes and I didn't provide any before either.Let me know if I can provide more information. I don't really know where to look.
Thanks for your help.
I don't know where to look, the resources about that are limited and
[EDIT]: In the meantime, I tried to create a directory and I faced the same issue as described here: https://stackoverflow.com/questions/77601341/ms-graphapi-php-sdk-fails-creating-a-new-folder
[EDIT BIS]: I also tried to migrate the api calls to contacts endpoint (POST users/{user-id}/contactFolders/{contact-folder-id}/contacts
with $graph->users()->byUserId('{user-id}')->contactFolders()->byContactFolderId('{contact-folder-id}')->contacts()->post($newContact, $configuration)->wait()
the configuration only has the header['Prefer' => 'IdType="ImmutableId"']
the thrown errorscould not serialize payload.
I don't undersand what I am doing wrong in the process... Any help would be appreciated.