CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Showing Birthdays and Job Anniversaries in the Newsfeed

anniversary-001

In our project we have a requirement to show birthdays and job anniversaries in the Newsfeed. The solution is simple (when you know it) but there has not been any information about it online, until today. I want to share a few lines of PowerShell code to enable Anniversary notifications in the Newsfeed. This desired piece of code was written by my colleague Emma Degerman. Enjoy:

$job = Get-SPTimerJob | ? { $_.TypeName -like "*.UserProfileChangeJob" }
$job.GenerateAnniversaries = $true
$job.Schedule = [Microsoft.SharePoint.SPSchedule]::FromString("hourly between 55 and 55")
$job.Update()

The code retrieves the Timer Job that changes User Profiles, sets “GenerateAnniversaries” to true, then it updates the schedule to run it before the Activity Feed Timer Job and updates it. By the way, it is only applicable for SharePoint On Premises.

This is it, a quick tip for a great Intranet.

Advertisements

6 responses to “Showing Birthdays and Job Anniversaries in the Newsfeed

  1. m00ntear 2014-11-19 at 01:04

    Interesting! I tried looking through the stored procedure responsible for doing the Generation as manually executing the timer job doesn’t propagate birthdays for me. In my environment no birthdays show up, even though the property Birthday exists for all users and is filled with dates such as this: 19.11.2014, 20.11.2014 (so correct dates, year = this year). Is it different in your environment? Do the birthdays only show up for people I follow? Do the birthdays only show up once a day?

    • Anatoly Mironov 2014-11-24 at 14:39

      Hi m00ntear, in my intranet, the birthdays are saved in the format: “February 13”. There is no year. Try that.

      On an anniversary an entry in the user’s microfeed is created. Just to investigate why it doesn’t work, try following: Find a “test person”, update his or her birthday to November 24.
      Trigger manually those timer jobs sequentially in the following order:
      1. User Profile Service Application – User Profile Change Job
      2. User Profile Service Application – Activity Feed Job

      Then go to the profile page for that test person. An entry should show up in the Activity Feed: Happy birthday, Test Person….

      In your newsfeed the birthdays will show up only for people who you follow (correct if I am wrong).

  2. m00ntear 2014-11-24 at 18:43

    Huh, weird, It actually does work!
    But your additional information certainly does help for later debugging and with other customers. Good to know that I would just have to set a birthday to the current date and re-run the timer jobs for it to show up. Saw the first birthday happening today, and yes you are right you only see birthdays of people you are following on your Newsfeed.

    • Anatoly Mironov 2014-11-25 at 09:58

      Cool! I am glad that it works. Thank you for your feedback. I’ll update my post with the additional information needed to get it up and running.

      • Papa 2016-05-05 at 14:08

        I just tried this approach and it didn’t work for me running
        1. User Profile Service Application – User Profile Change Job
        2. User Profile Service Application – Activity Feed Job
        after I changed the test user’s birthday to May 5
        I’ll appreciate your assistance.
        Thanks

  3. papa 2016-04-29 at 16:45

    When I try this is the error PowerShell returns
    $job.GenerateAnniversaries = $true
    Property ‘GenerateAnniversaries’ cannot be found on this object; make sure it
    exists and is settable.

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

Discovering SharePoint

And having fun doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis

%d bloggers like this: