Follow and unfollow sites using REST and Graph API - Strange behaviour

Chandani Prajapati 1 Reputation point

I am using Graph API to follow/unfollow sites for SPFx. But while calling API, I am always getting a successful response but when I check it in particular SharePoint site, It does not reflect the update. Also tried the same thing using REST API but unfortunately, got the same issue.

e.g. When I am using followedSites endpoint, I am getting 10 followed sites but after following/unfollowing any sites I am getting an updated response in followedSites. while I am checking the particular SharePoint site, it's not reflecting updates over there.

Graph API

I am using the below endpoints,
followedSites - to get all followed sites,
followedSites/add - to follow site
followedSites/remove - to unfollow site



Using below ednpoints,
/_api/social.following/follow - to follow
/_api/social.following/stopfollowing - to stop follow
/_api/social.following/isfollowed - to check is followed or not so based on this can follow/unfollow


Is it default behavior or I am missing something?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,323 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShivaniRai-MSFT 2,726 Reputation points

    Hi @Chandani Prajapati ,

    As per my testing using Graph API, I found out that it takes couple of minutes to get reflected in SharePoint site UI after making Graph call to follow site. You can verify the same at your end.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments