Are SharePoint files stored in Drive(s)?

Adz 286 Reputation points
2022-09-14T10:29:12.997+00:00

I have a requirement where I need to archive files created/uploaded through SharePoint.

I have been looking at the Graph API documentation which leads me to these two calls

/sites/{site-id}/drive Access the default drive (document library) for the given site.
/sites/{site-id}/drives Enumerate the drives (document libraries) under the site.

I can then work with the drive to access files through the delta etc

From what I can see is that all the files uploaded/created through SharePoint are saved in their respective Drives. Is my understanding correct? Is there anywhere else the files could be stored?

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

Accepted answer
  1. Rob Windsor 2,001 Reputation points
    2022-09-14T11:27:00.477+00:00

    The terminology can be confusing, but you use drives in Microsoft Graph to work with document libraries in SharePoint.

    You can use /sites/{site-id}/drives to list the document libraries in a site.

    240966-image.png

    You can then use /sites/{site-id}/drives/{drive-id}/root/children to list the files in the document library.

    241047-image.png

    The response in the screen capture above includes information about SampleDocument001.pdf in the Graph Documents library.

    241004-image.png


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.