I am working in SharePoint Online. I want to get modern page view count. I am searching for this on google and I fount this link. In that if you scroll in the end of page, you will see that says Microsoft is building Itemanalytics api. Here is link for reference.

I tried to test this in graph explorer. Below is my URL for item analytics:


The issue is when I run this in graph explorer, it throws me error that

The expression \"sites('tenantname.sharepoint.com')/sites/{ef9075ed-0978-441c-9c32-c0cc109e7604}/lists('{e5420cdd-4787-4a5e-8fb4-16356edc4d07}')/items/{bf29bb29-95f4-4edb-b29f-cfdf4d57f76b}/analytics\" is not valid."

Anyone that have work on this, can you tell me what am I doing wrong?

I have checked the search API way that is explained here. But it is not working on my end. It is giving null value. Do anyone has any other option to achieve this requirement?

1 Answer 1


I am not sure about how to get Modern page count. But your graph API Request URL is not correct. It should be as below

For Lists


For Library


If you need help to get site id and drive id then you can refer this answer

  • Hi. I am able to get list of SharePoint list using your first API. But I am facing issue while getting site pages library. Its neither in list nor in library result. So I am not able to get its pages. Commented Dec 26, 2018 at 8:33
  • For page you have to use Library url. Because pages it's self library Commented Dec 26, 2018 at 8:44
  • Site Pages is library but there are no Site pages drive. So how to get drive id for Site pages Commented Dec 27, 2018 at 9:03
  • Hi @lovethakker, you can refer github.com/microsoftgraph/microsoft-graph-docs/blob/master/… link to get site pages. Make sure you give proper permission to access Commented Dec 29, 2018 at 15:04
  • I am checking with tenant admin user. I am not sure how more permission I can give. Commented Jan 2, 2019 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.