/_api/social.following errors with /isfollowed and /my/followed documents
(First time user of GitHub, please forgive any errors)
Category
- [ ] Bug
Describe the bugs
I've been using the example code for following/unfollowing documents from SocialRestFollowingManager resource (
Over the last week I have experienced the following issues:
- 404 errors for all /_api/social.following/isfollowed calls
- /_api/social.following/my/followed(types=2) is returning sites instead of documents, and the scope is outside of the site I'm querying.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 10ba3673-5f22-a56d-de66-838d114eb641
- Version Independent ID: 67b35cf8-ea9f-6ac3-2ba0-d936f8e76056
- Content: Follow documents, sites, and tags by using the REST service in SharePoint
- Content Source: docs/general-development/how-to-follow-documents-sites-and-tags-by-using-the-rest-service-in-sharepoint-2.md
- Product: sharepoint
- Technology: sharepoint-framework
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
- For isfollowed endpoint, here is a sample to verify if current user followed a specific site:
<script src="https://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript">
var item = {
"actor":{
"__metadata":{"type":"SP.Social.SocialActorInfo"},
"ActorType":2,
"ContentUri": "https://zheguo.sharepoint.com/"
}
};
$( document ).ready(function() {
$.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/social.following/isfollowed",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data) {
console.log(data);
},
error: function (data) {
alert("Error");
}
});
});
</script>
The data returned:

- ActorType 2 is standing for sites, please refer the following document:
SP.Social.SocialActorInfo.actorType property
This should be a typo in the document, please see the sample request body:
For document (ActorType:1)

For Site (ActorType:2)

For Tag (ActorType:3)

Hi, Thanks for your thorough response.
- I'm trying to get followed documents, not followed sites. Yes, I'm using Actor type 1.
- The types in my/followed is a different parameter than ActorTypes. No matter what type I try, it keeps returning sites.
Endpoint URI structure GET http://
/ /_api/social.following/my/followed(types=15) Request parameter types
Type: Int32
The actor types to include. Users = 1, Documents = 2, Sites = 4, Tags = 8. Bitwise combinations are allowed.
I am also getting the same issue.
I have been using SharePoint online rest endpoint to get users to follow documents. The endpoint is {sitepath}/_api/social.following/my/followed(types=2) In the Same, I follow the Document using REST API Post method {sitepath}/_api/social.following/follow I was able to get follow docs in the response but from the last couple of DAYS, These endpoint has stopped working and not receiving the docs in response. Is there one else facing a similar issue or know about any outage on Microsoft side? Because the Same issue happened in all our client Tenants. FYI: This Query used in the APP Web. (SharePoint Hosted)
The Same issue happened across all my tenants. I have been checked more than 5 Tenants the same issue.
Please help to me Resolve this @andrewconnell @Hermitude @Jerry0527
Hello, we are currently experiencing the same issues in at least 2 tenants.
- We are able to fetch "all" followed items but no longer by actortype enum. That is, all types=... except 14 or 15 result in only followed sites being returned.
- Calls to "follow" result in 200 but no new documents are followed when we fetch all followed items.
I also had code working for months that can no longer use the isfollowed endpoint.
Code for reference:
var data = JSON.stringify({
"actor":{
"__metadata":{
"type":"SP.Social.SocialActorInfo"
},
"ActorType":1,
"ContentUri": docUrl,
"Id":null
}
});
var headers = {
"accept": "application/json;odata=verbose",
'content-type': 'application/json;odata=verbose',
'X-RequestDigest': document.getElementById('__REQUESTDIGEST').value,
credentials: 'same-origin'
}
fetch( followingManagerEndpoint + '/isfollowed', {
method: 'POST',
headers: headers,
body: data
})
I am also encountering this issue. The request to retrieve followed content does not return the correct data and following would result in a 404 error.
This has broken solutions in a few areas for my client.
Is there an estimated timeline for this to be resolves? Thanks all!
@JeremyKelley ... possible change in REST API behavior?
Hi I had find one workaround to get My followed documents using below URL
return $.ajax({
url: webUrl + "/_api/social.following/my/followed(types=6)",
type: "Get",
processData: false,
contentType: "application/json;odata=verbose",
headers: { "Accept": "application/json; odata=verbose" },
});
Once you received the response filter as shown below to get followed documents.
IsFollowed = true
CanFollow = false
Thanks @akashpanjwani . Have you found any workarounds for /isfollowed?
Hi @andrewconnell
Do we have a progress update into the investigation of this issue? If so is there a rough timeline for a resolution?
Thanks Andrew!
@WaltBC nothing shared = nothing to share. If I learn something, I'll share :)
Thanks @akashpanjwani . Have you found any workarounds for /isfollowed?
Yes we need to check from current user followed document whether exist or not.
I've asked the team that owns this API if they have any ideas what might be going on here either they or I will come back with an update based on what they find.
Separately you can use the newly updated to 1.0 Microsoft Graph API for following / unfollowing sites. Follow Unfollow List followed sites
As best we can tell the result from the Microsoft Graph API is up to date as you follow and stop following sites.
Thanks @JeremyKelley , note that the endpoint _/api/social.following/my/followed works for followed sites, but it has stopped working for followed documents
I have found great success transitioning from the isFollowed and /my/followed endpoints to Graph as @JeremyKelley stated.
For docs, how about https://graph.microsoft.com/v1.0/me/drive/following? I have found this to work well and it includes followed docs in SharePoint sites.
https://docs.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-1.0&tabs=http
Thanks, @eoverfield, note that this same suggestion was already mentioned by @siljemda in the duplicated issue #5669, 16 days ago. In my experience, /me/drive/following does NOT return the same documents than _/api/social.following/my/followed(types=2). The followed documents we need are the same that appear under "Docs I'm following" in https://[YOUR TENANT]-my.sharepoint.com/personal/[USER_LOGON]/Social/FollowedContent.aspx
Sorry to bother you @JeremyKelley ... it has been 15 days since your team started to investigate (more than 1 month since this bug was opened). Nothing yet to share?
I'm not sure if this has been officially fixed or not, but my API calls started working correctly again.
True. Both isfollowed and followed(types=2) are working for me as well. Thanks @sethstevenson.