Microsoft Stream + Graph API

Brass Contributor

I'm beginning to explore the Graph API and how it will relate to the video files loaded into OneDrive / SharePoint. I really enjoy using the Graph Explorer, but I'm struggling to find an example that will show the number of viewers, and the individuals that viewed the media as well. Does anyone have a sample GET command or code snippet that they can point me to?




1 Reply


I think what you're looking for is this 

There is quite a bit of code around using the SharePoint API but the numbers it reports are from SharePoint Search so are slightly different (reference).

I haven't been able to find a code example for you I'm afraid.


I've just found the following which talks about the GraphApi analytics for specific list item (file) giving the actorCount, actionCount

This lead me to

for the basic analytics and then 

the following which gives these values for a specific interval


I think with this and the PostMan tool getting a GraphApi token for authentication, should give you (and me now) enough to get analytics for specific files.