Real-Time UC

A Universal Communications Blog by Office Apps and Services MVP Michael LaMontagne

Bugs Lync Skype for Business

Skype for Business/Lync client: Can't move user to the Other Contacts group

While working with a client on end user training material, it was reported that the option to move or copy a contact to the “Other Contacts” group in the Skype for Business/Lync 2013 client was unavailable.

Digging deeper… I found that although the option to “Copy Contact To” was available for a contact within the “Other Contacts” group, it would just perform the “Move Contact To” function.

Testing with my own account, I found that move and copy a contact to “Other Contacts” was available and worked. Also copying a contact already in “Other Contacts” to another group did a copy vs. move like seen before.

Then it dawned on me that the working account was using the Unified Contact Store (UCS) and the issue account was not. Same results were seen using different builds of the Skype for Business/Lync 2013 & 2010 clients. Figuring this would be a perfect issue to play with the Lync Client SDK:

The following code was used to quickly load the SDK dll into PowerShell, prompt for the SIP address of the contact you would like to add into the “Other Contacts” group.

$sdkPath = "C:\temp\Microsoft.Lync.Model.DLL"
Import-Module $sdkPath

# Obtain the entry point to the Lync.Model API
$client = [Microsoft.Lync.Model.LyncClient]::GetClient()
$self = $client.Self		
$Contact = Read-Host -Prompt 'SIP address of contact to copy to Other Contacts group'

$contactobj = $self.Contact.ContactManager.GetContactByUri($Contact)
# $contactobj
$Groups = $self.Contact.ContactManager.Groups

	foreach ($Group in $Groups) {
		if($Group.Type -eq "CustomGroup"){
			if ($Group.Name -eq "Other Contacts"){
				if($group.Contains($contactobj) -eq $false){

This worked great for the UCS account but gave an “Access is denied” error on the non-UCS account.

Listing the contact groups ($Groups |Fl) for the non-UCS account, I found the contacts not in the “Other Contacts” group still showed “Other Contacts” in the list of CustomGroups.

I then tried using the “Move to Group” function on the non-UCS account and it worked…

#$Group[0] is Other Contacts group
#$Group[1] is Test group
#$Group[2] is AOG group
$contactobj.BeginMoveToGroup($Groups[0], $Groups[2], $null, $null)

Which was great until the contact was in more than one contact group.

In the end I just ended up removing the contact object from all groups and just re-added to the “Other Contacts”.

$self.Contact.ContactManager.BeginRemoveContactfromallgroups($contactobj, $null, $null)

The question: Is not being able to move or copy contacts into the “Other Contacts” a bug when not using UCS? Or the ability to use Other Contacts like any other custom group a bug in UCS?

Hugo-Octopress Theme | Powered by Hugo