microsoftgraph / microsoftgraph/msgraph-sdk-php
searchWithQ() returning "General exception while processing"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 669
- Forks
- 150
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 3
Description
I am trying to use the search for DriveItems within a SharePoint drive using the searchWithQ() method of this msgraph-sdk-php package.
$filename = "File_1.txt";
$result = $graphServiceClient->drives()->byDriveId('insert-drive-id-here')->items()->byDriveItemId('child-driveitem-id-here')->searchWithQ($filename)->get()->wait();
The library is returning an ApiException with message "General exception while processing". I cannot find any examples of how to search for DriveItems using this searchWithQ() method, and the Microsoft Graph official example looks incomplete:
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->searchWithQ('{q}', )->get()->wait();
Is there an official working example of the searchWithQ() functionality?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the searchWithQ() entry point and compare the request produced by the shown PHP call with the Microsoft Graph example. Reproduce the ApiException using the supplied DriveItems search scenario, then determine whether the SDK call or the example is incomplete. Done means the cause is identified and a working usage example or precise fix is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100