Get document libraries for domain -my.sharepoint.com

I am trying to access user generated document libraries in their own domain-my.sharepoint.com

based on the documentation I assumed the way to do this is

https://graph.microsoft.com/beta/sites/domain-my.sharepoint.com/drives

      

How do disks map to a document library (?)

I can make this work with domain.sharepoint.com

, but couldn't get it to work withdomain-my.sharepoint.com

here's what he says:

{
    "error": {
        "code": "invalidRequest",
        "message": "Provided id is not suitable for the current host",
        "innerError": {
            "request-id": "09c5722c-cfc3-4589-ba76-e57c44590d16",
            "date": "2017-06-27T06:53:59"
        }
    }
}

      

Any help would be appreciated.

+3


source to share


2 answers


I believe you are looking for the OneDrive Endpoint . You can access the current user drive

with https://graph.microsoft.com/v1.0/me/drive

/



0


source


Another way to get what you want is by requesting:

https://domain-my.sharepoint.com/_api/v2.0/sites/domain-my.sharepoint.com/drives



Basically, endpoints /_api/v2.0/sites

seem to support everything that is documented in the respective graphics API docs.

-1


source







All Articles