I am trying to develop a web part the lists the logged on users recently accessed documents, as per the home page of www.office.com, and the recent documents tab.
I originally thought this information would be coming from the MS Graph, using https://graph.microsoft.com/v1.0/me/drive/recent, but the results are different. The MS Graph doesn't show all the documents I have accessed, unlike the www.office.com page.
Doing a fiddler trace showed that it is getting the data from this endpoint: https://ocws.officeapps.live.com/ocs/v2/recent/docs?apps=Word,Excel,PowerPoint,Visio,OneNote,Sway,Forms&show=100&rs=en-AU
From my testing, it looks as though if I access a document in word online I can get this via the MS Graph but if I access a document in the word client I cannot see this in the graph, unless I edit the document, but in both cases the www.office.com page shows these documents, so the data and usage profile is being tracked somewhere!
[EDIT] I can also see all the documents as expected from the recent tab in ODfB. Just not in the graph
Is anybody able to help me understand how I can get this information or how I can call this endpoint, https://ocws.officeapps.live.com/ocs/v2/recent/docs?apps=Word,Excel,PowerPoint,Visio,OneNote,Sway,Forms&show=100&rs=en-AU, from my webpart?
My attempts to call this say the endpoint is not part of my tenant? Is this because I need to register the office live endpoint in AAD?
Thanks in advance Pete