The ContactManager class provides you with all of the features you need to create a contact list entirely suited to your needs. Using this class, you manage custom groups and their membership, as well as search for remote users by name, e-mail address, company, or phone number.

A contactis a single remote user whose availability and contact information pushed down to the Lync instance you are signed in on. The Microsoft Lync 2010 API is used to get this information from Lync and display on your custom contact list. A remote user becomes a contact when you have either performed a search for the user and initiated a conversation, or added the user to a custom group.

A Group is a collection of contacts. Microsoft Lync Server 2010 provisions Lync 2010 with groups at the time a user signs in to Lync Server 2010, so they are available to your application.

Classes Obtained from the ContactManager Class

The following figure illustrates the Lync 2010 API classes provided by ContactManager .

Group Class

The Group Class encapsulates a collection of individual Contact class instances. You use the Group class to add and remove individual contacts from a user's contact list. This class is also the base of the following classes.




Encapsulates a Distribution Group. Use this class to get group members, expand the group, and register for nested group events.


Provides a list of your favorite contacts.


Provides a list of your frequent contacts. Use this class to re-order the contacts in your Frequent Contacts group.


Encapsulates a custom group. Use this class to rename a custom group.

The Groups property of the ContactManager class returns a collection of Group classes of all of these types.

Contact Class

The Contact Class encapsulates all of the properties of an individual contact. To get a Contact instance representing the local user, you read the Self property of the ContactManager class.

ContactSubscription Class

The ContactSubscription class creates an ongoing subscription to contact information such as current availability and activity published by any Contact that has been added to a subscription. If you do not add a contact to a contact subscription, you will not get updates to that contact's information. You can do the following with a ContactSubsciption:

  • Add one or more contacts to the subscription.

  • Remove a contact from the subscription.

  • Set the rate at which the contact information in a subscription is refreshed.

  • Start a subscription with a list of the contact information types you are interested in.

  • Stop a subscription.

Methods Contained in the ContactManager Class

The ContactManager class contains many methods useful for taking action on Group and Contact class instances.

  • Add or remove a custom group.

  • Add a distribution group.

  • Search for contacts and distribution groups.

  • Add and contact to a custom group.

  • Remove a contact from a custom group or all custom groups.

  • Create ContactSubscription instances.

See Also