Checkout of DriveItem in SharePoint using Graph API

Akshith Reddy Thalla 80 Reputation points
2024-04-25T10:09:39.09+00:00

Unable to get the success response of checkout of DriveItem in SharePoint using GraphAPI.

https://learn.microsoft.com/en-us/graph/api/driveitem-checkout?view=graph-rest-1.0&tabs=http

  • Error: 404 Not Found.
  • Error Message: The resource could not be found.
  • Passing the correct Item Id within the Document Library.
  • Using v1 version of the API
  • Provided all the required permission.

***If I just tweak the Endpoint URL a bit, I'm getting the 400 Bad Request and with Message as Resource not found for the segment 'checkout'.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,682 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2024-04-26T03:05:44.1033333+00:00

    Hi @Akshith Reddy Thalla,

    Per my test, I could use following api to checkout drive item

    User's image

    Here is the api

    POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem/checkout
    

    The item id is not the driveitem id. It should be the item id like following

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


0 additional answers

Sort by: Most helpful