Graph API Drive Items

Ivan Zeljkovic 80 Reputation points
2024-06-20T20:35:14.9+00:00

Hi there, I'm using several of the OneDrive/SharePoint APIs to grab all folder/file info for a given user/site.

One concern I have: will I see folders/files shared with the user that they do not own?

The API that I'm using for the collection is `/v1.0/drives/{drive-id}/root/children, would this ever return items that do not belong to that drive-id (shared with it)?

I unfortunately don't have the resources to test this behavior between two business accounts, so I appreciate any help. Thanks.

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
    2024-06-21T08:43:47.6566667+00:00

    No, it will not. Only files from the given drive will be returned. If you have added a "shortcut" to a shared file, it will be shown as .url item, which basically contains the URL to the shared item.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.