---
title: "Invoke action discardCheckout"
method: POST
path: "/drives/{driveId}/items/{driveItemId}/microsoft.graph.discardCheckout"
tags: ["drives.driveItem"]
---

# Invoke action discardCheckout

`POST /drives/{driveId}/items/{driveItemId}/microsoft.graph.discardCheckout`

## Request

- Base URL: `https://graph.microsoft.com/v1.0`
- URL: `https://graph.microsoft.com/v1.0/drives/{driveId}/items/{driveItemId}/microsoft.graph.discardCheckout`
- Auth: OAuth 2
  - Authorization code: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`
  - Token URL: `https://login.microsoftonline.com/common/oauth2/v2.0/token`
- TypeScript: <https://skmtc.dev/ballerina-platform/apis/files/docs/drives/:driveId/items/:driveItemId/microsoft.graph.discardCheckout/post.ts> (a function with typed inputs; its response is checked against the schema)

Discard the check out of a driveItem. This action releases a driveItem resource that was previously checked out. Any changes made to the item while it was checked out are discarded.  The same user that performed the checkout must discard it. Another alternative is to use application permissions.

## Path parameters

- `driveId` string, required
- `driveItemId` string, required

## Response `2XX`

Success

## Other responses

- `default`: error

---

[API](https://skmtc.dev/ballerina-platform/apis/files.md) - [All operations](https://skmtc.dev/ballerina-platform/apis/files/llms.txt) - [OpenAPI document](https://skmtc.dev/ballerina-platform/apis/files/revisions/c34150e97737?raw)
