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

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.

  • 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 '17 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 ;) – Harry Berry Aug 22 '17 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 '17 at 12:44
  • Well if you install it today, you can still use it for another days :) – Harry Berry Aug 24 '17 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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