Getting a person's user ID in Activities
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 7, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Get a person's user ID in Activities by performing a profiles search by name or retrieving the ID from a shared member list.

One of the parameters you can use to search activities is by a person's user ID. In fact, you must use this parameter instead of a person's email address in configurations in which email addresses are prevented from being displayed. But, how do you get a person's user ID?

Before you begin

If you have the Profiles installed, the quickest way to get a person's user ID is to perform a profiles search by name. The feed that is returned contains one entry for each person in the directory that has that name. The entry identifies the user ID of the person in the <snx:userid> element. To perform a search of profiles by name, use the following resource:

profiles_server/atom/ Name or First Name

About this task

If you do not have Profiles installed or cannot access Profiles data programmatically, you can also retrieve a person's user ID from the member list of an activity that you share with the person. To do so, complete the following steps:



If you can add a parameter to narrow down the results but still return the activity that you share with the person and to which she has contributed an entry, add it to narrow the search.

  1. Get the href of the activity that you share with the person by retrieving all of your activities. Use the following resource to retrieve the activities in your My Activities view:
  2. In the feed returned, find the activity that you and the person share in common. Retrieve the member list of that activity by sending a GET request to the web address specified in the href attribute of the <link> element that has the rel="" attribute value.
  3. From the content returned, find the entry that contains the person's name. The person's user ID is specified in the associated <snx:userid> element.