microsoftgraph / msgraph-sdk-php

Microsoft Graph Library for PHP.
Other
578 stars 144 forks source link

Trying to list all my onedrive root entries #1435

Open giladsegal10 opened 10 months ago

giladsegal10 commented 10 months ago

Hello, I created in php a class that makes an Graph Client (Creates access token and appClient).

I'm trying to create a GET request to list all my onedrive root (files and folders) with this endpoint: GET https://graph.microsoft.com/v1.0/users/{user-id}/drive/root/children

This GET request work in POSTMAN but not in my own php code: $response = $this->appClient->users()->byUserId($this->user_id)->drive()->root()->children()->get($configuration)->wait();

The $configuration is a new DriveRequestBuilderGetRequestConfiguration(). Perhaps I'm using the wrong Import?

Thank You, Gilad Segal

GBirch commented 10 months ago

You probably want to use a ChildrenRequestBuilderGetRequestConfiguration object.