I'm struggling to find how Sharepoint works.
My goal is to upload a file to the 'Document Center' of my company from php using the Graph.
I think DocumentLibraries are seen as drives but I can't find the name or ID of the Document folder.

GET https://graph.microsoft.com/beta/sites/mycompany.sharepoint.com/drive/{ID TO FIND}/children

How can I find this ID ? (and if you know how i can find childrens IDs, it could be interesting)


First you can get the libraries data:




You will get list of all drives with theirs' id (Property called id). Next you can access drive items like this:


Hope it will help:)

| improve this answer | |
  • THANKS ! (I forgot the "/sites" between the host and the site when i tried server-relative path) – Milan Rodriguez Sep 2 '17 at 19:18
  • With Java API getting a site with path this works : msGraphClient.sites("MyDomain.sharepoint.com:/sites/MySite:") Don't forget : for domain AND site. Working with V1.0 Graph API. – Maxence Nov 19 '18 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.