SharePoint Online: Following and Graph API issues

Occasional Visitor

We are working on the feature that collects information about sites followed by users in SharePoint Online. While digging dipper, we found out few issues connected with “follow” functionality.

We have:

Issues we noticed:

1.

As logged test user on the https://contoso.sharepoint.com/sites/test site, when I click “follow” action at the right top corner for the very first time everything works fine and I can see that both:

Things complicate when we are trying to unfollow site. Then on the SharePoint we have information that site is unfollowed, but both on the /_layouts/15/sharepoint.aspx Site and Graph Explorer we still have information that site is followed. Even worst – we can see that on the /_layouts/15/sharepoint.aspx site there are listed sites that were followed but fully deleted from SharePoint (removed after 93 days from sites recycle bin).

All requests were completed successfully with no errors in the network and browser developer console. We waited one day to give time for synchronization, but with no result.

 

DawidP_1-1650952819831.png

 

 

DawidP_2-1650952898584.png

 

2.

We used Graph API endpoint to add site to the followed:
/users/{user-id}/followedSites/add

Due to description in the MS Graph API documentation:
https://docs.microsoft.com/en-us/graph/api/site-follow?view=graph-rest-1.0&tabs=http

In this case we also can see on the /_layouts/15/sharepoint.aspx site and Graph API endpoint (https://graph.microsoft.com/v1.0/me/followedSites) that site is followed, but on the SharePoint /sites/test there is information that site is unfollowed.

Here we also waited one day to give time for synchronization, but with no result.

 

3.
According to the MS Graph API documentation:
https://docs.microsoft.com/en-us/graph/api/sites-list-followed?view=graph-rest-1.0&tabs=http

There is possibility to get user’s list of followed sites (using application permissions). But calling /users/{user-id}/followedSites endpoint gives "General exception while processing” error for a lot of users (not for all). On the other side calling /me/followedSites returns appropriate data when we are logged as those users (for which we have error using application permissions) in the Graph API Explorer.

 

How to resolve those problems?

 

0 Replies