api - Access all domain users' file in Office365 OneDrive -


i need access users' files in domain via rest api. access domain user's files via access token granted via normal oauth flow.

i found article: building daemon or service apps office 365 mail, calendar, , contacts apis (oauth2 client credential flow)

this article mentions mail, calendar, , contacts api. file api supported?

this worked me:

  1. create access_token described here https://graph.microsoft.io/en-us/docs/authorization/app_only , use in next steps in authorization header
  2. get users using rest api: https://graph.microsoft.com/v1.0/users
  3. iterate through users , files api (adding userprincipalname in url): https://graph.microsoft.com/v1.0/users/user@xxxx.onmicrosoft.com/drive/root/children

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -