0

how to access the user's OneDrive data by using Office 365 API and Administrator OAuth token of the particular domain?

1 Answer 1

0

You can use the Microsoft Graph to get data from various Office 365 services with a single REST end point.

Here's the reference for OneDrive

An example REST URL, to get the files at the root of the signed in user's OneDrive, would be:

https://graph.microsoft.com/v1.0/me/drive/root/children

And the resulting JSON might look like:

{
  "value": [
    {"name": "myfile.jpg", "size": 2048, "file": {} },
    {"name": "Documents", "folder": { "childCount": 4} },
    {"name": "Photos", "folder": { "childCount": 203} },
    {"name": "my sheet(1).xlsx", "size": 197 }
  ],
  "@odata.nextLink": "https://..."
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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