Microsoft Graph API returns "The resource could not be found" error when moving DocumentSet, but operation succeeds

Carlos Han 20 Reputation points
2026-01-26T09:21:47.88+00:00

Hello Microsoft Support,

We are encountering an issue when using the Microsoft Graph API to move items in SharePoint/OneDrive. Specifically, when we move a DocumentSet using the API, the operation actually succeeds (the DocumentSet is moved as expected), but the API call returns an error:

ODataError: Microsoft.Graph.Models.ODataErrors.ODataError: The resource could not be found.

Key Details:

• The DocumentSet is actually moved successfully in SharePoint/OneDrive.

• The API response, however, is an ODataError indicating "The resource could not be found."

• This issue only occurs when moving DocumentSet items. Moving regular folders or files works as expected and does not return this error.

• The problem is reproducible and consistent for DocumentSet, but not for folders or files.

• The issue occurs both for moves within the same site and across different sites.

Steps to Reproduce:

  1. Use the Microsoft Graph API to move a DocumentSet by sending a PATCH request to /drives/{drive-id}/items/{item-id} with the new parent reference.
  2. Observe that the DocumentSet is moved as expected in the SharePoint/OneDrive UI.
  3. The API call returns an ODataError: "The resource could not be found."
  4. Repeat the same operation for a regular folder or file; the API returns success as expected.

Expected Behavior:

If the move operation succeeds, the API should return a success response, not an error.

Actual Behavior:

The API returns an error even though the DocumentSet is moved successfully.

Impact:

• Our application cannot reliably determine if the operation succeeded or failed for DocumentSet items.

• This causes confusion for users and complicates error handling logic.

Request:

• Please investigate why the API returns an error only when moving DocumentSet items, even though the operation is successful.

• Is this a known issue or a timing/sync problem specific to DocumentSet?

• Are there any recommended workarounds or best practices to handle this scenario?

Thank you for your assistance.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Kha-N 7,575 Reputation points Microsoft External Staff Moderator
    2026-01-26T12:21:23.62+00:00

    Hi @carloshan,

    Welcome to Microsoft Q&A, and thank you very much for reaching out.

    Based on your description, I tested the same Graph API call in Graph Explorer, and in my environment the request completed successfully without returning the error you encountered.

    User's image

    Unfortunately, my testing environment is limited, so I am not able to fully replicate the exact conditions of your scenario.

    That said, if helpful, you can try running the same request in Graph Explorer as a workaround, note that you would need to sign in to your tenant first. Here is the method I used:

    PATCH:

    https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{documentSetItemId}
    

    Request Body:

    
    {
      "parentReference": {
        "id": "<destinationFolderItemId>"
      },
      "name": "<DocumentSetName>"
    }
     
    

    From my research, Document Sets are a special SharePoint content type. When they are moved, SharePoint performs additional internal workflows and metadata operations that do not finish within the normal Graph API request/response timing. Because of this, Graph may return an incorrect error response even though the move actually succeeded.

    I also looked for any documentation or community threads describing this behavior, but I was unable to find any references that match what you are seeing.

    Given that, I would recommend raising this behavior in the Microsoft GitHub Discussions so other developers and Microsoft engineers can weigh in. They’re best positioned to provide guidance and valuable insights on this topic.

    I hope this helps.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Q&A Assist
    2026-01-26T09:23:03.1466667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The issue you are experiencing with the Microsoft Graph API returning an ODataError stating "The resource could not be found" when moving DocumentSet items, despite the operation succeeding, may be related to how the API handles DocumentSets specifically. While the operation for moving regular folders or files works as expected, DocumentSets may have unique characteristics that lead to this inconsistency in error reporting.

    Here are a few points to consider:

    • DocumentSet Handling: DocumentSets are a specific type of resource in SharePoint, and there may be additional checks or conditions that the API enforces when moving them, which could lead to the error even when the move is successful.
    • Timing or Sync Issues: It's possible that there is a timing issue where the API does not immediately recognize the successful move of the DocumentSet, leading to the error response. This could be a temporary sync issue between the API and SharePoint.
    • Known Issues: While there might not be specific documentation indicating this as a known issue, it is advisable to check the Microsoft Graph API documentation or forums for any updates or similar reports from other users.

    Workarounds and Best Practices:

    1. Error Handling Logic: Implement logic in your application to treat the operation as successful if the DocumentSet is moved in the SharePoint UI, even if the API returns an error. This may help reduce confusion for users.
    2. Retry Mechanism: Consider implementing a retry mechanism after a short delay when you receive this specific error for DocumentSets, as the operation may succeed upon subsequent attempts.
    3. Feedback to Microsoft: If this behavior is causing significant issues, consider providing feedback to Microsoft through their support channels to investigate further.

    In summary, while the operation succeeds, the API's error response for DocumentSets may be due to specific handling or timing issues. Adjusting your error handling strategy may alleviate some of the confusion for users.


    References:

    0 comments No comments

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.