I have created a shared drive called 'eicshare' on OneDrive. I am using the php library 'microsoft-graph'. I am connecting with an application token (not a user token, as the job will be run in the background on a server). I can retrieve group details, including the eicshare details, with the following snippet:
private function getGroups($accessToken)
{
try {
$graph = new Graph();
$graph->setAccessToken($accessToken);
$url = "/groups";
$groups = $graph->createRequest("GET", $url)
->execute();
} catch (\Exception $e) {
dd($e->getMessage());
}
return $groups->getBody();
}
However, I would like to retrieve the details (in particular the group id) for the specific group with the display name 'eicshare'. I tried adding search/filter clauses but keep running into errors. Please could you tell me how to restructure the above snippet to retrieve the eicshare drive details.
Also, if there is a good resource that I may refer to, please provide a link as I am having problems finding the correct resources to refer to.
Thank you.