0

Possibly I am posting the duplicate question as already described in the post below.

How to get admin access to files for all user's OneDrive

We are running in to same issue. Can not access any users one drive with following api:

https://graph.microsoft.com/v1.0/users/{userPrincipalName}/drive/root/children

we have all the permissions in place and account used for authentication is Global Administrator.

Interestingly,as described in the article below, when we provide access from the Admin Portal on each users one drive, above api works well with the same set of permissions.

https://sharepointmaven.com/how-to-access-someone-elses-onedrive-account/

When we try the api below, States code is 200 but no data. https://graph.microsoft.com/v1.0/users/{useremail}/drives

Appreciate your help.

Pallav
  • 145
  • 7

1 Answers1

0

I was able to solve this. As doubt, it was a permission issue. I had tried the sample as described in the blog below:

https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-daemon-v2/

Configured the app permission in Azure AD (App Registration(Preview)) as shown below:

enter image description here

It started working. Also, I should mention that this never worked in Graph Explorer.

Hope this helps.

Pallav
  • 145
  • 7