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

Đang mở
#1,233 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
57/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
XSLT
Star
171
Fork
56
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoftgraph/msgraph-metadata

Tất cả issue của microsoftgraph/msgraph-metadata

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.