Asked by:
How to programmatically get Frequent Sharepoint Sites using REST API?

Question
-
O365 SP Online offers a view of the frequent and the followed sites of the current user which is available in the home page of the "My Site" of the user.
Amalaraja Fernando,
SharePoint Architect
Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.Thursday, December 28, 2017 6:11 PM
All replies
-
Hi,
You can access Frequent sites with this endpoint:
https://tenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/recent
More information specified here:
https://sharepoint.protiviti.com/blog/Lists/Posts/Post.aspx?ID=305
But per my test, this API currently can't be accessed with a message "Office graph is disabled":
I have checked the Office Graph Option in SharePoint Online Admin Center, and it's enabled:
But For the other similiar endpoint request, it works with the endpoint line below:
https://tenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/suggested https://tenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed
I assume this is a internal issue in SharePoint Online server, I would suggest you can open a feedback to report this issue to Microsoft:
https://office365.uservoice.com/
Thanks
Best Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com- Edited by Jerry ZyMicrosoft contingent staff Friday, December 29, 2017 9:56 AM
Friday, December 29, 2017 9:44 AM -
Thanks Jerry.
I have contacted MS for resolution on the Followed Sites Endpoint
Amalaraja Fernando,
SharePoint Architect
Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.Friday, December 29, 2017 7:39 PM -
Hi Amalaraja,
Some times ago , I have created the webpart to aggregate social feeds of the given user. I tried the SP.UserProfiles.JS file to retrieve the followed Items such as item,list, document , site and including subsite for the given user.
But I am sure, In Office Graph, we don't have the endpoint in O365 to see the followed and frequent site detail feed. Can you please try the client managed code "FollowedItemData" class in the user profile assembly ?
Please I am also request you to update the resolution notes given by Microsoft if any apart from the above tips.
Murugesa Pandian MCSA,MCSE,MCPD<br/> Gear up from some solid action not on slide,video and talk show on learning the emerging technologies.
Saturday, December 30, 2017 4:13 AM -
Hi Amalaraja,
Followed sites OData can be accessed with the EndPoint below:
https://tenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed
This endpoint works without problem:
But for frequent sites, it will throw such exception like above, you can report it to Microsoft.
Thanks
Best Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.comMonday, January 1, 2018 2:30 AM