Search code examples
microsoft-graph-api

To get drive ID from SharePoint URL


Using MS Graph API, is there a way that we can find out the driveId of a certain folder with a given SharePoint URL?

The URL would look like this:

https://zpssgpatientsolutions.sharepoint.com/:f:/s/my_site/my_subsite/EllFGxYcxMNKt0kqOYH7OrIBo0AJu5NQ9-jc4rm2RTIKhA?e=IK11dT

Solution

  • There are not currently any APIs to convert from SharePoint URL to OneDrive driveId. On the other hand the OneDrive DriveItem APIs do return the webUrl of the SharePoint file in question.