Forum Discussion

JithinR2380's avatar
JithinR2380
Copper Contributor
May 01, 2024
Solved

Last Viewed Date for Stream(on SharePoint) Videos

Does anyone know if we can retrieve Last Viewed Date for videos stored on Stream(on SharePoint)? Since these videos are treated as files, I was hoping to use Pnp PowerShell cmdlets or Graph endpoints to check the Last Viewed Date for videos on our tenant in one go.

  • JithinR2380 - I don't think there is an easy way to do this. There isn't a field that tracks the last accessed property exposed in Graph that I saw from a quick search. And if it was there I know it wouldn't be mapped to when someone actually played the video. You could look at the "activity" and "analytics" options in Graph and maybe that would help you sort of in the same line but not exactly?

2 Replies

  • JithinR2380 - I don't think there is an easy way to do this. There isn't a field that tracks the last accessed property exposed in Graph that I saw from a quick search. And if it was there I know it wouldn't be mapped to when someone actually played the video. You could look at the "activity" and "analytics" options in Graph and maybe that would help you sort of in the same line but not exactly?

    • JithinR2380's avatar
      JithinR2380
      Copper Contributor

      Thanks Marc Mroz .

       

      Can you please confirm the Graph endpoints you were talking about? Saw the item analytics endpoint (https://learn.microsoft.com/en-us/graph/api/itemanalytics-get?view=graph-rest-1.0&tabs=http), were you talking about this one?

      It didn't really return anything useful when I tried it out in graph explorer. 

      Also, can you clarify if there is actually a last accessed property for files in SharePoint REST API (I don't need to stick to Graph as such).

      I also considered using the FileAccessed audit activity for this purpose. But reading your answer I believe that this wouldn't really let us know if the video was played. Is that right?

      Also, is this "Last viewed date" timestamp expected to be available in the future. I didn't see it in the Stream roadmap.

Resources