knl
knl

Reputation: 1051

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

Upvotes: 2

Views: 5395

Answers (2)

GentleToast
GentleToast

Reputation: 1

You can get the library via list path and pull in the drive relationshi

https://graph.microsoft.com/v1.0/sites/*******.sharepoint.com:/sites/[sitepath]:/Lists/[LibraryName]/drive?$Select=Id

Upvotes: 0

Brian T. Jackett MSFT
Brian T. Jackett MSFT

Reputation: 226

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.

Upvotes: 2

Related Questions