Thursday, November 9, 2017

Hide users from address book in Skype for Business

SfB On-Premise is making use of the Exchange GAL.
If you don't want users or other resources to appear in address book / GAL search in the Skype for Business client there is an easy way. Hiding contacts from GAL, by changing an AD related attribute. This could be e.g. hiding Helpdesk Team Members

This is the Exchange attribute for hiding users from the Global Address List (GAL). If this is set to TRUE, which indicates it doesn’t need to appear on the GAL, Lync will also ignore this user for the Address Book.

This sets the attribute "msExchHideFromAddressLists" to True.
It also clears the attribute "ShowinAddressBook" 

This is the Script:

$users = Get-CsAdUser -Filter {name -Like "*HelpDesk*"}
foreach ($object in $users)
    {
      Set-ADObject -Add @{msExchHideFromAddressLists=$true} -Identity $object.DistinguishedName
      Set-ADObject –clear ShowinAddressBook -Identity $object.DistinguishedName
  }

In this example i hide all the "HelpDesk" users from showing up in address book search.
You can change the filter to an OU too.

After running the script the objects will no longer show when you do an address book search in your Skype4B or Lync client.

Alternative ABSConfig.exe (SfB Resource Kit):

Alternative 2:

You could move users into a different OU, which should be hidden and force the CsUserReplicatorConfiguration to run only on specific OUs (DN).
Set-CsUserReplicatorConfiguration -Identity global -ADDomainNamingContextList @{Add="dc=fabrikam,dc=com"}

Note:
Exchange, SfB and SharePoint are consolidating information. Exchange and SfB share a common Contact Data Strore, (Unified Contact Store UCS), 

No comments:

Post a Comment