vgrem / phpSPO

Microsoft 365 Library for PHP.
MIT License
360 stars 117 forks source link

getWebs()->getCount() returns 0 #324

Closed miqrogroove closed 1 year ago

miqrogroove commented 1 year ago

I'm not sure what to try next. I've tried using ClientCredential and UserCredentials to get the app context. I can call getWeb()->getWebs()->getCount() with no errors, but the result is zero. getWeb()->getFolders()->getCount() returns zero.

getSite()->getPrimaryUri() returns NULL.

What does that mean?

After a lot of experimentation, I was able to get a good result from getFiles()->get()->executeQuery(). But I still get the strange results mentioned above, and every call to $folder->getExists() returns false.

miqrogroove commented 1 year ago

Resolved using the get()->executeQuery() pattern.