Share via

Using Microsoft Graph to pull file usage details

Kmetz 0 Reputation points
2024-05-23T18:52:26.1733333+00:00

On my site (just a single site, not an entire tenant), I have enabled the site feature "Sharepoint Viewers". This allows me to see who has viewed a file (and when). This is helpful when it comes to see if specific users have viewed required documentation (i.e., training docs).

I am wondering if there is a way with Microsoft Graph or something else to be able to pull this data for each file into a summarized report (like excel)? My end goal is to use that data in Power BI to see which files have been viewed, by whom, and all the drillable data that can be gleaned from that (like region and branch specific metrics). Any assistance would be appreciated!

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2024-05-24T02:29:03.2666667+00:00

    Hi @Kmetz,

    You could use reports/getSharePointSiteUsageDetail to get the site usage. Here is the api for reference

    GET https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D7')
    
    

    Here is the document

    https://learn.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1.0&tabs=http


    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.

    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.