Forum Discussion

Brent Ellis's avatar
Brent Ellis
Silver Contributor
Nov 09, 2016
Solved

Following O365 Group Sites (excluded in API)

We use several custom web parts throughout our Intranet to provide quick access to "Site's I'm Following" in our SharePoint Online environment.

 

This REST API is located at:  https://mytenant.sharepoint.com/_api/social.following/my/followed(types=14)

 

However, when you follow an O365 Group Site, it does not appear in that list.  It does appear if you to to the modern SharePoint home thing for followed site (https://mytenant.sharepoint.com/_layouts/15/sharepoint.aspx?v=following).

 

Is there a new API endpoint to get ALL sites i'm following regardless of classic vs o365 group site?  Plans to fix this in the current API?

  • So scratch that, found my own answer:

     

    Updated API's to get followed and recent sites:

     

    Followed: https://mytenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed?mostRecentFirst=true&start=0&count=100&fillSiteData=true

     

    Recent: https://mytenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed?mostRecentFirst=true&start=0&count=100&fillSiteData=true

     

    Updating my scripts now :manlol:

4 Replies

  • Hi Brent, It is because Delve is taking over. Maybe you can still see them in the left bar. But it is like the promoted sites that went down to the left.
    • Brent Ellis's avatar
      Brent Ellis
      Silver Contributor
      Thanks Paul, I found the new Delve endpoint to replace the old one, and was able to easily swap it out for my existing code. It is actually much more robust and useful than the old school one (as it should be)!
      • Mayra Martho's avatar
        Mayra Martho
        Copper Contributor

        Hi Brent,

         

        I was reading your post - I am researching the best way to retrieve the Office 365 Groups and Sites that the user is following. It would be great if it could also return when it was last modified (maybe asking for too much).

         

        You mentioned that there's a Delve endpoint to do that. What is the endpoit? Are you using Grah Query or Search REST APIs?

         

        Thanks,

        Mayra

  • Brent Ellis's avatar
    Brent Ellis
    Silver Contributor

    So scratch that, found my own answer:

     

    Updated API's to get followed and recent sites:

     

    Followed: https://mytenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed?mostRecentFirst=true&start=0&count=100&fillSiteData=true

     

    Recent: https://mytenant.sharepoint.com/_vti_bin/homeapi.ashx/sites/followed?mostRecentFirst=true&start=0&count=100&fillSiteData=true

     

    Updating my scripts now :manlol:

Resources