The problem seemed fairly straight-forward. The targeted site I wanted to follow couldn’t be found. However, it didn’t make sense. The instance URL I was targeting (https://chrisweldon.sharepoint.com) did in fact exist. Furthermore, I was not already following that site. So, why was this failing?
Let’s take a look at some code:
This is fairly straight-forward. I simply setup a social actor to follow and call out to the
I changed the permissions in my
AppManifest.xml from Read to Write:
|User Profiles (Social)||Write|
Sadly, I received the same error message. However, if you read the MSDN Documentation on Developing Social Features in SharePoint 2013, there is a section in there talking about user profiles:
User Profiles (http://sharepoint/social/tenant) The permission request scope used to access all user profiles. Only the profile picture can be changed; all other user profile properties are read-only for apps for SharePoint. Apps that request rights for the User Profiles scope must be installed by a tenant administrator.
In a nutshell, I have to grant Tenant permissions to my app to be able to have my user follow a new site. Therefore, my new permissions look like the following:
|User Profiles (Social)||Read|
As indicated by the paragraph above, the app now needs to be installed by a tenant administrator. However, in doing so, the app now follows sites (and other content) with ease. Why the obscure error message? That I don’t know, and I hope the SharePoint team might look to address this with a more correct error message in the near future.