Forum Discussion
Retrieve overview of users recent documents
Hi Sander Simons ,
take a look here: Social Intelligence Graph api, mainly are in beta https://docs.microsoft.com/it-it/graph/api/resources/social-overview?view=graph-rest-beta but start to follow :)
Meanwhile, you can use this approach, waiting GA of graph api: Office Graph instead Microsoft Graph .
Look at this sample https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-officegraph
Here you can find the right query
Cheers,
Federico
- Sander SimonsMar 11, 2019Copper Contributor
Hi FedericoPorceddu82, thank you for the response.
The links posted are not working anymore and have changed a bit. Here are the new links which you are refering to:- https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples
- https://github.com/SharePoint/sp-dev-fx-webparts/blob/master/samples/react-officegraph/src/webparts/myRecentDocuments/components/MyRecentDocuments.tsx
As you mentioned there is the Social Intelligence Graph API. This is also the API we are using. The following query is used in our case:
.api("me/insights/used") .version("beta")
I have checked the usage of the Office Graph but when I tried to execute a query within the browser I got the following message:
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, Microsoft.Office.Server.Search.REST.SearchServiceException</m:code><m:message xml:lang="en-US">SPO graph API is deprecated.</m:message></m:error>The query we used was:https://{TENANTNAME}.sharepoint.com/_api/search/query?querytext=%27*%27&properties=%27GraphQuery:actor(me\\,or(action\\:1001\\,action\\:1003)),GraphRankingModel:{%22features%22\\:[{%22function%22\\:%22EdgeTime%22}]}%27So it looks like this is not supported and not working anymore.
Does anyone have other ideas which we can test or try?