Sharepointology is the study and handling of Microsoft Office SharePoint Server

Web Part to show upcomming birthdays in SharePoint

Posted 25Jan09 by Erwin in Development

codeplexI’ve created a SharePointology project on

It is a project that aims at giving SharePoint users an even more user-friendly experience by providing a useful collection of SharePoint extensions and SharePoint developers some examples on how stuff is done.

SPOShowBirthdayWebpartMy first contribution to this project will be a webpart called SPOShowBirthdayWebPart, it is a webpart that will display all users whose birthday is coming up in x days.

Download SPOShowBirthdayWebPart v1.0.

This webpart uses the RunWithElevatedPrivileges function to impersonate the administrator in SharePoint Server 2007. After you do this, you may receive the following error message when you try to enumerate all user profiles:

“Access Denied. Only an administrator may enumerate through all user profiles.”

Microsoft released a hotfix package for this bug “SharePoint Server 2007 hotfix package: May 8, 2008″,

RSSIf you like this post then please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox.

28 Responses

  1. Mariano

    after installation, while adding the webpart to a webpart zone, I receive a ‘unable to add selected webpart’ Cannot import SPOBirthdaywebpart why? help me please


  2. Erwin

    Hi Mariano,

    Try this:

    * Go to your Main Page, Choose “Site Actions”, “Site Settings”, “Modify All Site Settings”
    * In the column “Galleries”, choose “Web Parts”
    * Click “New”
    * Check the “Overwrite if file already exists?”
    * Look for the SPOShowBirthdayWebPart and check this too
    * Click the button “Populate Gallery”
    * Try adding the web part to a webpart zone.

    Let me know if this works or not. Thanks.


  3. George

    Hi Erwin,

    Thanks for the webpart, works a treat. I too had the same error that Mariono had but was easily fixed following your instructions. I have one question though, it is possible to display the user’s Full Name (that is first name and Last name). At the moment, the user’s login name is displayed.


  4. Erwin


    I will try to implement your suggestions (and those of others) into a next version of this webpart. Watch the blog for updates.


  5. Neeaj

    I have a custom list with a field called Date of Birth in it ? . How do i display that field in your webpart? Because for now it only shows no There are no items to show in this view. Do i have to use the Birthday Column ( from the parent site ) ? Please let me know

  6. Erwin

    Hi Neeaj,

    This webpart queries the SharePoint user profiles to determine the birthdays, it doesn’t work with a custom list.

  7. Neeaj

    so do i need to enter the user information in the AD , is that what you are saying ?

  8. Erwin


    Your users should enter their birthday into the “MySite/MyProfile/Details”. Webpart will pick up that User Profile to display the birtdays.

    You could enter their birthday for them if you have access to the Central Administration, but that would be a lot of work.

  9. Ismail

    When any user enters February 29 as the birthday, the webpart displays the following “Year, Month, and Day parameters describe an un-representable DateTime.”? Pls comment

  10. Evelia

    I am using this web part. It’s very usefull. However, I have a problem. It takes too much time to show the birthdays. Are there anything that I forgot to do it?.. Please, help me.

  11. Erwin


    This Web part queries all your users for their birthday, do you have a lot of users in your SharePoint?

  12. Erwin


    I’ll try and fix this in the next release, but I was wondering what should be displayed in that case? Any ideas?

  13. Maya

    Hello Erwin,

    Thanks for great post.
    I’m using wss3.0, is it possible to use this web part in wss3.0 and instead to show contact information of the users??

    please reply me back to my email address

  14. Erwin

    Hi Maya,

    I don’t have a WSS 3.0 installation available to test the web part in, but I can tell you it uses UserProfiles, and I think that if WSS has userprofiles the web part should work. Let me know when you tried it out, if it doesn’t work I could try and fix that.

    To answer your second question, I’m going to release a new version shortly where the username is a link to the profile of the user. Check my blog for more information.


  15. Maya

    hi again ,

    no it did not work :(
    since we don’t have userProfiles in wss.
    can this webPart use the user information list in wss?
    do you have the time to modify this part for me?

    it will be to kind of you
    Thanks again

  16. Joao

    Hi all,

    I installed the webpart, but now its showing an ‘object reference not set to an instance of an object’. What could be the problem?

    From wich field does the webpart gets the birth day info from?


  17. Deepak

    Hi Ervin,
    Thank you very much for your valuable post, After installing the web part & putting it on the web part zone, it doesn’t show any birthday date & says There are no items to show in this view.
    what do i need to do to show the upcoming birthdays,
    Please help me,

  18. Anonymous

    Hi Ervin,

    Thank you very much for the SPOShowBirthdayWebPart. After installing the web part and putting it on the web part zone, it doesn’t show any birthday date & says There are no items to show in this view.

    I saw this below response:
    “Your users should enter their birthday into the “MySite/MyProfile/Details”. Webpart will pick up that User Profile to display the birtdays.
    You could enter their birthday for them if you have access to the Central Administration, but that would be a lot of work.”

    My question is: we have disabled the MYSITE link on our Sharepoint intranet, and so the users will not have be able to add their info on their own profiles. Can this webpart be linked directly with AD?? Or can we link the webpart to a list which already has this data??

    Thank you so much

  19. SharePoint 2007 : La recherche par la date de naissance , Blog Technique de Romelard Fabrice

    [...] Web Part to show upcomming birthdays in SharePoint [...]

  20. Kirill

    Thank you! Good instructions and good web-part! It really works.

    Спасибо! Хорошие инструкции и отличная веб-часть! Все работает как надо.

  21. Emmanuel B

    It works excellent for me. Thanks

  22. Moiz

    gr8 work.. i have implement in moss2007. cannot resolve the Access denied issue. cant find any download link for the update you have given]


  23. Sjokke

    Hey Erwin

    Thanks for sharing your project.
    Like Evelia said, it takes some time to load this webpart.

    I get the following (using developer dashboard) about 70 times:
    ◦ExecuteOnChannel:GetUserData (18.61 ms)■CreateChannelAsProcess:Microsoft.Office.Server.UserProfiles.IProfileDBCacheService (0.33 ms)■CreateChannelWithIssuedToken (0.20 ms)■InitializeWcfOperation (0.02 ms)■ExecuteWcfOperation:http://Microsoft.Office.Server.UserProfiles/GetUserData (16.15 ms)■CleanUpWcfOperation (0.01 ms)
    It’s querying the dbo.Profile_EnumUsers and dbo.profile_GetUserProfileData the same amount of times.

    Is this what slows it down? And what could we possibly do to speed up the load time?


  24. gago

    Hi, is this webpart 2010-ready?


  25. Amit

    Hi All,

    It’s work for me.
    Looking for more webparts then please visit


  26. Stompie

    This is good but I prefer the Birthdays web part provided by Vinewave (

  27. Julio

    I need a birthday webpart wich work with the Activev Directory.

    Any idea?


  28. Stompie

    Check out the Birthdays Web Part by Vinewave.

Leave a Comment


My name is Erwin Bastiaensen and I am a Software Architect from Belgium, with a huge interest in technology. Lately I have been involved in some Java projects and implementing, interfacing and extending a Sharepoint portal.

You can contact me at sharepointology[@]

View Erwin Bastiaensen's profile on LinkedIn