Active Directory contact is changed to the phone number in the contact list of Lync2013/SfB2015

On 14th July 2015, a new Lync2013/SfB2015 client update was released (KB3054946 – 15.0.4737.1001). We were eager to see it released, especially because it includes the following fix:

Active Directory contact’s name is changed to the phone number in the contact list of Skype for Business or Lync 2013
https://support.microsoft.com/kb/3072753

Most users didn’t notice it because this only affects AD Contacts without sip address or email address.

To explain this let’s think in the following scenario: the company Gears has 3 receptions. They are located in the same site and they aren’t Lync/Skype4B enabled. The receptions only have one telephone connected to a traditional PBX and we add them as contacts in AD, so that they are searchable in Lync/Skype4B.

In Lync2013/Skype4B, we add these receptions to our contact list:

displaynamephone01

Now we need to sign off and sign in again. After this, the Display Name is replaced with the contact Phone Number:

displaynamephone02

If we don’t know the exact telephone number, we won’t be able to tell which of the results we need to call.

For the Lync2013/Skype4B client with the July 2015 update, we have the same behaviour as in the Lync 2010 client:

displaynamephone01

displaynamephone03

Address Book search for “First + Last Name” when Display Name is “Last, First Name” (WebSearchOnly)

It is quite common to have users stored in Active Directory (AD) with “Last, First Name” (e. g., “Paulino, David”). Since Lync/SfB is heavily dependent on AD, what will happen to users that want to search for “First + Last Name”?

Regarding the Address Book download, this is an issue that has already been discussed in a previous post:

Last + First name searches in Lync/Skype4B Address Book (GalContacts.db)

However, when we use WebSearchOnly and we have the AD Display Name as “Last, First Name”, we may get some complaints from users saying they cannot search for “First + Last Name”. The reason for this is most likely that their intention is to search for a user with additional text in their Display Name, like “Carmine, Anthony (COG)”, but they end up searching only for “Anthony Carmine”.

Here are some examples:

AddressBookWLFN02

Looking in the RTCAB database, we notice that Display Names with a comma have more entries:

AddressBookWLFN03

AddressBookWLFN04

AddressBookWLFN05

AddressBookWLFN06

Note: The attribute 3 represents the Display Name:

AddressBookWLFN07

AddressBookWLFN08

Again, this will only work if we have a comma in the Display Name. Without it, we will only be able to search for the Display Name itself:

AddressBookWLFN09

AddressBookWLFN10

AddressBookWLFN11

Last + First name searches in Lync/SfB Address Book (GalContacts.db)

In a previous post in Joe Calev’s WebLog, we were shown how to enable Last + First name searches in Lync Server:

How to enable last name, first searches in Lync Address Book
https://blogs.msdn.microsoft.com/jcalev/2012/06/06/how-to-enable-last-name-first-searches-in-lync-address-book.aspx

That workaround works for WebSearchAndFileDownload and FileDownloadOnly — what we basically need is the GalContacts.db file.

Recently, Joe Calev’s workaround was introduced in Lync Server 2013 (Nov 2014 Cumulative Update) and it is also present in the Skype for Business Server 2015 RTM version. For the Lync Server 2010 pools, we need to follow Joe Calev’s post.

The RtcAbAttributeIndexRules.xml file is located — in a default Lync/Skype4B Server installation — in the following folders:

Lync Server 2010
C:\Program Files\Microsoft Lync Server 2010\Server\Core

Lync Server 2013
C:\Program Files\Microsoft Lync Server 2013\Server\Core

Skype for Business Server 2015
C:\Program Files\Skype for Business Server 2015\Server\Core

In Joe Calev’s post, we are proposed to use the following:

<attribute name="displayName">
	<indexRules>
		<indexRule id="displayName_rule_01">
			<description>
				<![CDATA[
          Index displayName as-is
        ]]>
			</description>
			<valuePattern>
				<![CDATA[^.*$]]>
			</valuePattern>
			<indexValues>
				<indexValue>
					<![CDATA[$0]]>
				</indexValue>
			</indexValues>
		</indexRule>
		<indexRule id="displayName_rule_02">
			<description>
				<![CDATA[
          Handle last name first name searches
      ]]>
			</description>
			<valuePattern>
				<![CDATA[(.+)(\s+)(.+)]]>
			</valuePattern>
			<indexValues>
				<indexValue>
					<![CDATA[$3 $1]]>
				</indexValue>
			</indexValues>
		</indexRule>
	</indexRules>
</attribute>

However, the final version is:

<attribute name="displayName">
	<indexRules>
    	<indexRule id="displayName_rule_01">
			<description>
	            <![CDATA[
	              Index displayName as-is
	            ]]>
          	</description>
			<valuePattern>
        		<![CDATA[^.*$]]>
			</valuePattern>
			<indexValues>
				<indexValue>
					<![CDATA[$0]]>
				</indexValue>
			</indexValues>
		</indexRule>
		<indexRule id="displayName_rule_02">
			<description>
            	<![CDATA[
		             Allow search without middle name
        	    ]]>
          	</description>
			<valuePattern>
				<![CDATA[^([^\s]+).*\s([^\s]+)$]]>
			</valuePattern>
			<indexValues>
            	<indexValue>
					<![CDATA[$1 $2]]>
				</indexValue>
			</indexValues>
		</indexRule>
		<indexRule id="displayName_rule_03">
			<description>
				<![CDATA[
					Handle last name first name searches
				]]>
			</description>
			<valuePattern>
				<![CDATA[(.+)(,+)(.+)]]>
			</valuePattern>
			<indexValues>
				<indexValue>
					<![CDATA[$3 $1]]>
				</indexValue>
			</indexValues>
		</indexRule>
	</indexRules>
 </attribute>

The main difference is that we have an additional rule to allow search without a middle name:

<indexRule id="displayName_rule_02">
          <description>
            <![CDATA[
              Allow search without middle name
            ]]>
          </description>
          <valuePattern>
            <![CDATA[^([^\s]+).*\s([^\s]+)$]]>
          </valuePattern>
          <indexValues>
            <indexValue>
              <![CDATA[$1 $2]]>
            </indexValue>
          </indexValues>
        </indexRule>

This will work wherever you have a Display Name like ‘Paulino’, ‘David’ or ‘David Paulino’ in the Active Directory.

Here are some examples:

Display Name: Augustus Cole

AddressBookFLN01

AddressBookFLN02

Display Name: High Priest Skorge

AddressBookFLN03

AddressBookFLN04

Display Name: Carmine, Benjamin

AddressBookFLN07

AddressBookFLN08

Display Name: Carmine, Anthony (COG)

AddressBookFLN05

AddressBookFLN06