Lync contact groups

Lync 2013

Core concepts

Learn about Lync Microsoft Lync 2013 contact groups and the Microsoft Lync 2013 SDK classes and events that give you programmatic access to the custom group.

Last modified: December 10, 2012

Applies to: Lync 2013 | Lync Server 2013

A Lync 2013 contact group is collections of contacts and is simply a logical grouping of SIP URIs that resolve to people. Among the group types is the custom group, which is an arbitrary and user-defined collection. The distribution group is an exception to this rule as it is defined once in Active Directory and can be displayed in a contact list, but not changed in the contact list. A logical group such as a custom group can include any user or telephone number that can be resolved to a SIP or TEL URI. This means that a logical group can include organization Lync users, federated users on another Microsoft Lync Server 2013 topology, or federated users on a SIP server such as Yahoo or Windows Live Messenger.

A Lync 2013 typical group collection includes multiple custom groups, a single Frequent Contacts group, a single Favorite Contacts group, and can include one or more distribution groups. Each of these group types has its own set of rules that govern group operations. For example, you can rename a custom group while you cannot rename any of the other group types. Despite these behavioral differences, all of the group subtypes inherit a base Microsoft.Lync.Model.Group.Group class and inherit all of the public properties, events, and methods of the base group. Although it is syntactically correct to call the Group.BeginRemoveContact on a Microsoft.Lync.Model.Group.DistributionGroup object, this operation is not allowed and results in an exception. Other unique characteristics of the group subtypes are implemented in the group subclasses. For example, only the custom group can be renamed, so the Microsoft.Lync.Model.Group.CustomGroup class has a rename method but the other group subclasses do not.

The Microsoft.Lync.Model.ContactManager exposes group-related methods that allow you to add or remove groups. These methods apply only to custom groups because you cannot add or remove any other type of group. However, the ContactManager.BeginRemoveGroup method accepts any class that inherits the Group base class. It is syntactically correct to write application logic that passes a distribution group, Favorite Contacts, or Frequent Contacts group to this method. At runtime, this code generates an ArgumentException and the group is not removed.

The ContactManager exposes two methods for adding groups.

A custom contact group is a group that your application has full programmatic control over. You can create a new custom group, delete a custom group, rename a custom group, and change the group membership. In contrast, you cannot rename or remove a distribution group or the FavoriteContacts and FrequentContacts groups. All of these specialty group types are subtypes of the Microsoft.Lync.Model.Group.Group class and inherit all of the public properties, events, and methods of the base group.

Tip Tip

The Lync client contact list displays a contact group under the title "Frequent contacts." The corresponding API classes are the Microsoft.Lync.Model.Group.FavoriteContacts and Microsoft.Lync.Model.Group.FrequentContacts groups. Because the API exposes the frequent contacts as these two subgroups, you can show them as separate groups in a custom contact list. The Group.Name property value for this group is "Pinned Contacts" and the FrequentContacts group name property is "Most Used Contacts."