Share via

Clarification on OneDrive Document Check-in/Check-out Behavior

Varun Rathi 0 Reputation points
2025-07-16T13:34:32.78+00:00

Hi,

I’d like to understand the intended check-in/check-out flow for OneDrive documents, both via the UI and the Microsoft Graph API, based on the observations below:

  1. UI Behavior Without Versioning Requirement:
    • Check-in/check-out options are not visible in the OneDrive UI by default.
  2. Post Enabling 'Require documents to be checked out before they can be edited':
    • Files open in read-only mode until checked out.
    • However, the Check Out option is not available at the folder level, and existing files cannot be edited via UI.
     
  3. Behavior for Newly Created Files:
    • Files are checked out by default.
    • The Check-in and Discard Check-out options are visible in the UI.
    • Once checked in or discarded, the Check-out option is no longer available via UI.
  4. Graph API Behavior:
    • Files can be checked in/out using the Graph API, regardless of versioning settings.
    • If a file is checked out via API, it is reflected in the UI (e.g., “checked out by someone”) even though the access token for the graph api belongs to the same User.
    • Even if the Graph API is called using client credentials, the user cannot edit the file in UI unless they are the one who checked it out.

Given these observations, could you please confirm the expected and supported behavior for:

  • UI-based check-in/check-out
  • API-based check-in/check-out
  • Interoperability between UI and API actions (e.g., what happens when files are checked out by API but accessed via UI)

Looking forward to your clarification.

Microsoft 365 and Office | OneDrive | Other | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. IGYQ 19,770 Reputation points Independent Advisor
    2025-07-17T13:55:20.0266667+00:00

    Hi! I'll share information for each line:

    1.UI-based check-in/check-out is NOT enabled by default.

    • The options are hidden unless you're using OneDrive for business/education (backed by SharePoint)
    • You enable "require check-out" via library settings

    Once it is enabled:

    • Files open as read-only until checked out
    • New files are auto-checked out to the creator
    • Check-in/Check-out appears in ellipsis menu
    • Check-out on folders is not supported on individual files

    2.UI-based check-in/check-out works even if UI doesn't expose it

    • API honors library settings: "Require check-out" is disabled, you can still manually check files in/out via API
    • Identify binding matters. A file checked out by USER A cannot be edited in UI by USER B, even if suing the same Graph client app.

    Take note of the following:

    • If client credentials flow is used, the API impersonates the app identity. The UI will see this as "checked out by someone else"
    • You cannot check-in a file via UI if it was checked out via Graph by a different user or app
    • You can check the checkedOutType and checkedOutBy filed via Graph to track ownership.

    3.Interoperability between UI and API actions.

    Here are some samples.

    • API checks out a file. Result: UI shows it as locked/red-only to others.
    • Same user tries editing in UI. Result: It is allowed if identity matches the API check-out.
    • A Different user edits in UI. Result: It is blocked with "checked out by someone"
    • File is checked via API. Result: UI updates status and allows editing again.
    • File is discarded in UI. Result: Graph checkout returns none.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.