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.
http://domain.sharepoint.com/_layouts/15/sharepoint.aspx?v=following
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
REST API
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?