Drive item `discardCheckout` fails with `resourceCheckedOut` error when using application permissions, despite docs stating this should work

Aperta
#1,233 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
api

Direzione di ricerca

Start by comparing the issue’s delegated and application permission requests with the driveitem-discardcheckout documentation linked in the report. Determine whether the observed error conflicts with the documented application permission behavior, and identify the relevant metadata or documentation entry in this repository; the issue does not name a file. Done means the behavior and documentation discrepancy is resolved or clearly explained.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ToTriage

Summary

The documentation for discardCheckout states that application permissions can discard any checkout, regardless of who created it. In practice, discarding a checkout that was created via delegated auth fails with notAllowed / resourceCheckedOut when called with application permissions.

Steps to reproduce

  1. Checkout a file using delegated credentials:
POST https://graph.microsoft.com/v1.0/drives/{DriveID}/items/{ItemID}/checkout
  1. Discard the checkout using application credentials:
POST https://graph.microsoft.com/v1.0/drives/{DriveID}/items/{ItemID}/checkout

Expected behavior

Per the docs, application access should be able to discard any checkout.

Requests made with application access can discard any checkout.

Actual behavior

{
  "error": {
    "code": "notAllowed",
    "message": "The resource has been checked-out by another user",
    "innerError": {
      "code": "resourceLocked",
      "innerError": {
        "code": "resourceCheckedOut"
      },
      "date": "2026-09-30T09:39:25",
      "request-id": "588b93bb-eb52-4d98-879c-74c5cd475338",
      "client-request-id": "588b93bb-eb52-4d98-879c-74c5cd475338"
    }
  }
}

Reference

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

Lingua principale
XSLT
Stelle
171
Fork
56
Merge medio
1g 11h
PR unite (30g)
9

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-metadata

Tutte le issue di microsoftgraph/msgraph-metadata

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.