About the shared folder in SharePointAPI"GET /me/drive/sharedWithMe"

Ayase Morita 260 Reputation points
2025-04-03T08:06:27.0866667+00:00

Regarding the SharePoint API's "GET /me/drive/sharedWithMe" response, does it include shared items (such as files or folders) that exist within a shared folder? Specifically, will both the shared folder itself and the items within that folder appear as separate entries in the response?

Additionally, when a folder is designated as a shared folder, are the items contained within that folder also treated as shared items? Could you please clarify this behavior?

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,567 questions
{count} votes

Accepted answer
  1. Ling Zhou_MSFT 23,600 Reputation points Microsoft External Staff
    2025-04-04T02:47:29.1433333+00:00

    Hi @Ayase Morita,

    Hope everything is going well.

    Question 1: Specifically, will both the shared folder itself and the items within that folder appear as separate entries in the response?

    The shared folder itself will appear as a shared item in the "GET /me/drive/sharedWithMe" response.

    Items within the shared folder will not automatically appear in the response unless they are explicitly shared with you.

    In short, each file or subfolder needs to be shared separately for it to appear in the "sharedWithMe" response.

    I test it in my environment:

    Someone Share a folder with me. This folder contains a subfolder and a file.

    User's image

    In the response, I could only find the folder that was shared, its subfolders and files did not appear in the response.

    User's image

    User's image

    User's image

    Question2: When a folder is designated as a shared folder, are the items contained within that folder also treated as shared items?

    When a folder is shared, the items within that folder inherit the sharing permissions of the parent folder. This means that if you have access to a shared folder, you will also have access to the items within it. However, they are not returned in the response. These items are not treated as individually shared items unless explicitly shared with you.

    If you have any questions, please do not hesitate to contact me.

    Moreover, if the issue can be fixed successfully, please click "Accept Answer" so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.

    Your kind contribution is much appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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