Make files on OneDrive/Sharepoint hidden through Graph API

Cavas, M (Martin) 41 Reputation points

Hi Microsoft Community,

I am not particularly facing an issue but more of a real question if this is possible within the technological boundaries of Graph API.

I have manually created File A within Private Sharepoint Site. I do not want anyone including myself to visually see the file when the Sharepoint Site is opened through browser. But I do want it to be visible when browsing through Graph API calls. Can this be done?

Kind regards,

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,355 questions
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.
2,795 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 39,821 Reputation points

    Hi @Cavas, M (Martin)

    Yes, this requirement can be realized.

    Go to your site's documents bar and create a custom column (hidden), then click Exit grid view and add parameters (can be any value) for your custom column.



    Next, go to Settings>Library settings>More library settings>All Documents>Filter>OK.




    After setting the filter, no one (including yourself) can visually see the file when they open a SharePoint site, but you can still get it by calling the graph API.{site id}/drive/root/children  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

0 additional answers

Sort by: Most helpful