0

I am trying to only get a specific type of event from a users activity feed. I have been searching msdn & google but I cannot find any type of mapping such as

  ActivityTypeID     Event
  ---------------    ----------------
   1                 Tags And Notes
   2                 Added colleague
0

Took while but I found it in PowerShell

$siteUrl = "https://mysite.contesso.com"
$s = get-spsite $siteUrl
$ctxt = get-spservicecontext $s
$profile = [Microsoft.Office.Server.UserProfiles.Profileloader]::GetProfileLoader($ctxt).GetUserProfile()

#or
#$profile = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ctxt).GetUserProfile("accountName")

$mgr = new-object Microsoft.Office.Server.Activityfeed.activityManager($profile,$ctxt)
$mgr.ActivityTypes | Select ActivityTypeName, ActivityTypeId

Use the above code in your SharePoint Powershell console window and it will display a list of values.

Here's the output on my system:

ActivityTypeName                                                 ActivityTypeId
----------------                                                 --------------
StatusMessage                                                                17
DLMembershipChange                                                           10
SharingInterest                                                              11
SocialTaggingByColleague                                                     12
NoteboardPosts                                                               13
SocialTaggingByAnyone                                                        14
SocialRatings                                                                15
INTERNAL_ChangeMarker                                                        16
ColleagueAddition                                                             6
TitleChange                                                                   7
ManagerChange                                                                 8
BlogUpdate                                                                    9
ProfilePropertyChange                                                         1
Birthday_Reminder                                                             2
Birthday_Today                                                                3
WorkplaceAnniversary_Reminder                                                 4
WorkplaceAnniversary_Today                                                    5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.