SharePoint 2013 Following sites not working

I found an interesting issue in one of my SharePoint 2013 environments related to following sites. When a regular user clicks on the “Follow” button displayed in the top right corner of the screen the user will get an error.

image

If you look into the ULS log you will find the following error:

image

SQL Database ‘Databasename’ on SQL Server instance ‘InstanceName’ not found. Additional error information from SQL Server is included below.  Cannot open database “Databasename” requested by the login. The login failed.  Login failed for user ‘Domain\Username’.

Interesting about this issue is, that the account which doesn’t have permission to open the database is the application pool identity of the portal webapplication in which the site lives which the user would like to follow.

The Mysites reside in a different webapplication then the site the user wants to follow.

After a little investigation I tried to set the “GrantAccessToProcessIdentity”  for the mysite webapplication for the applicationpool identity of the webapplication where the site the user want to follow resides in.

For that I used the below Powershell, which grants the account specified connect permissions on the database level. (This was also used in my previous blogposts “PowerPoint / Word WebApps–PowerPoint / Word WebApp cannot open this presentation / document” and “Excel calculation services–The Workbook can not be opened” to grant the proper permissions)

$webApp = Get-SPWebApplication “YourWebapp”

$webApp.GrantAccessToProcessIdentity(“YourIdentity”)

After running this I double-checked the permission of the database in SQL and found the permissions granted to the account as expected. When the user now tries to follow a site everything works as expected.

Disclaimer:

I don’t know if this is the proper way to solve this issue, I have encountered it only once due to the fact that it is still very early in the SP2013 implementation timeframe, I just wanted to share my experiences with this issue and will continue to keep my eyes open. If you experience the same problems please let me know.

Advertisements

3 responses to “SharePoint 2013 Following sites not working”

  1. tradmanwp says :

    Thanks a lot, that actually helped me.
    Still I just wonder, what the real root case of that problem could be.
    The reason why I ask that question, is because from time to time I stumble across solutions that only provide a temporary cure and sometimes even cause aftereffects.
    In this case, the permission also need to be set each time you create a new content-database.I just can´t believe, that this is a normal behaviour, there must have been some fault in the preceding tasks that causes this consequential error.
    Your feedback is highly appreciated.
    regards
    Thomas

    • SPSoldier says :

      Hi Thomas, Thank you for your comment… I have to admit that I have never experienced this issue ever since. Even though I have setup a few SharePoint farms in the meanwhile…

Trackbacks / Pingbacks

  1. Users lost ability to follow sites. | sharepoint2013admin - 03/06/2015

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: