Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SPSocialFeedManager.GetFeedFor throws exception 'No Security Trimmer found'

$
0
0

This is an on premise setup. Reading feeds via SSOM, I am able to use SPSocialFeedManager.GetFeedFor method to get feeds for the current user fine. When I try to use SPSocialFeedManager.GetFeedFor to get the personal feed of another user I always get an unexpected exception here is the output from the exception:

InternalMessage:
ServerErrorSecurityTrimmer : No Security Trimmer found  : Correlation ID:91db0d9c-c85e-4053-b411-7f3ba555ea08 : Date and Time : 4/2/2013 9:21:11 AM

InternalStackTrace:
at Microsoft.Office.Server.Microfeed.MicroBlogEntity.SecurityTrimMicroFeed(List`1 mbThreads, SPMicrofeedRetrievalOptions retrievalOptions)
at Microsoft.Office.Server.Microfeed.SPMicrofeedThreadCollection.SecurityTrimMicroFeed(SPMicrofeedRetrievalOptions retrievalOptions)
at Microsoft.Office.Server.Microfeed.SPMicrofeedThreadCollection.Populate(SPMicrofeedRetrievalOptions retrievalOptions, SPMicrofeedContext context)
at Microsoft.Office.Server.Microfeed.SPMicrofeedManager.CommonGetFeedFor(SPMicrofeedRetrievalOptions retrievalOptions)
at Microsoft.Office.Server.Microfeed.SPMicrofeedManager.CommonPubFeedGetter(SPMicrofeedRetrievalOptions feedOptions, MicrofeedPublishedFeedType feedType, Boolean publicView)
at Microsoft.Office.Server.Microfeed.SPMicrofeedManager.GetPublishedFeed(String feedOwner, SPMicrofeedRetrievalOptions feedOptions, MicrofeedPublishedFeedType typeOfPubFeed)
at Microsoft.Office.Server.Social.SPSocialFeedManager.Microsoft.Office.Server.Social.ISocialFeedManagerProxy.ProxyGetFeedFor(String actorId, SPSocialFeedOptions options)
at Microsoft.Office.Server.Social.SPSocialFeedManager.<>c__DisplayClass4b`1.<S2SInvoke>b__4a()
at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func)

Message:
The operation failed because an internal error occurred. Internal type name: Microsoft.Office.Server.Microfeed.MicrofeedException. Internal error code: 58.

StackTrace:
at Microsoft.Office.Server.Social.SPSocialUtil.TryTranslateExceptionAndThrow(Exception exception)
at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func)
at Microsoft.Office.Server.Social.SPSocialFeedManager.<>c__DisplayClass48`1.<S2SInvoke>b__47()
at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func)
at Microsoft.Office.Server.Social.SPSocialFeedManager.<>c__DisplayClass2f.<GetFeedFor>b__2d()
at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func)

Here is a code sample, I can get the user's profile information fine and render properties from it but calling GetFeedFor using an accountNameother than current user's results in the above error. I know some of the variables are undefined but I pulled this together for the sample.

var ctx = SPServiceContext.Current;
this.m_profileManager = new UserProfileManager(ctx);
this.Profile = this.m_profileManager.GetUserProfile(accountName);
this.m_socialFeedManager = new SPSocialFeedManager(this.Profile, ctx,SPContext.Current.Web.CurrentUser.UserToken);
var settings = new SPSocialFeedOptions() {
	MaxThreadCount = maxThreadCount
};
m_socialFeedManager.GetFeedFor(this.Profile.AccountName,settings);



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>