Warm tip: This article is reproduced from stackoverflow.com, please click
microsoft-graph

Microsoft Graph Explorer checkout returns status code 500 "Unknown error"

发布于 2020-04-15 10:16:25

I would like to checkout a file and I am issuing the following POST request in Microsoft Graph Explorer: https://graph.microsoft.com/v1.0/drives/<drive-id>/items/<item-id>/checkout

I get the following error code:

Failure - Status Code 500

and the following response:

"error": {
    "code": "-1, Microsoft.SharePoint.Client.UnknownError",
    "message": "Unknown Error",
} 

I tried to checkin the file with the following POST request https://graph.microsoft.com/v1.0/drives/<drive-id>/items/<item-id>/checkin and then I get the error:

"error": {
    "code": "invalidRequest",
    "message": "The file is not checked out."
}

What do I need to do to checkout the file?

Questioner
Marius
Viewed
73
Marc LaFleur 2020-02-04 05:00

The /checkin and /checkout endpoints are only available in the Beta version:

POST https://graph.microsoft.com/beta/drives/{driveId}/items/{itemId}/checkout
POST https://graph.microsoft.com/beta/drives/{driveId}/items/{itemId}/checkin