3

Do we have any Apis to get the Last Opened Documents That is displayed in the the Office 365 Home Page. Intention is to get the list of the last opened Documents using SpFx webpart. enter image description here

1 Answer 1

3

Yes you can use the graph api. Check out the api with the graph explorer. The api function you need is: https://graph.microsoft.com/v1.0/me/drive/recent

For "marketing reasons" this api command is in the onedrive section, but it returns your recent onedrive and sharepoint documents.

4
  • Thanks a lot for the information, but do you know if this can be used in Sharepoint Frame work to retrieve data , as far as i have read ,it offers access to only two scopes Group.ReadWrite.All and Reports.All!!
    – Jaj
    Aug 21, 2017 at 16:16
  • I have not heard of this Scopes yet. But check out this github repo: It contains spfx webparts, that access the graph api: github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/…. There is also one webpart which is called myrecentdocuments ;) Aug 22, 2017 at 12:24
  • I think the code uses GraphQueryLanguage and as per microsoft these APIs will be discontinued on August 31, 2017.
    – Jaj
    Aug 23, 2017 at 12:44
  • Well if you install it today, you can still use it for another days :) Aug 24, 2017 at 7:23

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.