What is the api to get the drive ID for an organization without specifying the username

Sols 1 Reputation point
2021-07-16T05:57:24.153+00:00

I want to upload and download files to an organization one drive. What is the API for this. As of now, I find the API to get driveID of a user and not the driveID of the organization.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,560 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-07-19T02:30:07.773+00:00

    Hi anonymous users-6549,

    What did you mean organization one drive? Do you mean that a library in SharePoint sites?

    If so, you could get the drive by the site path: GET /sites/{hostname}:/{server-relative-path}:/drive

    For example, your site url is https://tenant.sharepoint.com/sites/test, you could get the url with the endpoint:

    https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com:/sites/test:/drive  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.