Page level analytics using Graph API

2026-10-23T17:18:41.2633333+00:00

I'm not able to find API endpoint for page level analytics within a sharepoint site using Graph API.

Microsoft Security | Microsoft Graph
0 comments No comments

2 answers

Sort by: Most helpful
  1. AI answer

    2026-10-23T17:19:30.45+00:00

    Microsoft Graph does not provide a SharePoint page-level analytics endpoint; use the Graph site-usage report for site totals, or retrieve SharePoint audit events through the Office 365 Management Activity API when individual-page activity is required.

    What Microsoft Graph supports

    The closest endpoint is:

    GET https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D30')
    Authorization: Bearer {token}
    

    Supported periods are D7, D30, D90, and D180. The endpoint requires Reports.Read.All and returns a 302 Found redirect to a short-lived CSV download URL. Its output includes Site ID, Site URL, Page View Count, and Visited Page Count, but no page URL or page identifier; therefore, the counts cannot be broken down by individual page.^1^

    Graph also provides:

    GET https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsagePages(period='D30')
    Authorization: Bearer {token}
    

    That report returns the number of pages viewed across all sites, rather than analytics for a specified page.^2^

    The /sites/{site-id}/pages API manages page content and metadata; it is not an analytics API. Graph’s documented SharePoint resource scope centers on sites, lists, list items, and drives.^3^

    Alternative for individual-page events

    For programmatic page-level reporting, use the Office 365 Management Activity API:

    1. Create a tenant subscription for Audit.SharePoint.
    2. Poll the subscription for available content blobs.
    3. Download each blob.
    4. Filter the returned audit records locally by operation and the page’s object identifier or URL.
    5. Aggregate records into the required page-view metrics.

    The API exposes tenant-level content blobs rather than supporting server-side queries for a particular site, page, or event. New subscriptions can take up to 12 hours to produce their first blobs, and events are not guaranteed to arrive in chronological order.^4^ ^5^

    Relevant audit operations include:

    • PagePrefetched — content was prefetched and does not definitively indicate that the user navigated to the page.
    • PageViewedExtended — continued viewing of a page for an extended period.
    • Page-view signaling events, which should be used instead of treating every prefetch as a completed view.^6^

    The activity schema provides common fields such as creation time, operation, user, workload, and object ID, and identifies Page as a SharePoint item type.^7^

    Built-in analytics without an API

    For an individual published page, open the page and select Analytics at the top. Page owners and site members can view viewers, views, average time spent, and traffic over 7-, 30-, or 90-day periods. Where the applicable Viva licensing requirements are met, the report can also be exported to Excel or PowerPoint.^8^


    References

    1. reportRoot: getSharePointSiteUsageDetail
    2. reportRoot: getSharePointSiteUsagePages
    3. Working with SharePoint sites in Microsoft Graph
    4. Office 365 Management Activity API reference
    5. Office 365 Management Activity API FAQs and troubleshooting
    6. Audit log activities
    7. Office 365 Management Activity API schema
    8. [News](https://support.microsoft.com/sharepoint/sites-pages/view-usage-data-for-sharepoint-pages-and-news#export-report-data-and-charts)
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.
  2. Vasil Michev 128.6K Reputation points MVP Volunteer Moderator
    2026-10-24T11:59:52.12+00:00

    There is no separate endpoint for this. But as pages are represented as list items, you can use the standard /analytics endpoint against the corresponding list item. See for example this thread: https://techcommunity.microsoft.com/blog/spblog/how-to-retrieve-analytics-information-for-pages-in-the-site-pages-using-graph-ge/2366457

    Make sure to use the item's listItemUniqueId value when calling the /analytics endpoint, no data will be returned otherwise.

    Was this answer helpful?

    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.