Distribution Groups and Lync 2013

The Lync 2013 LHPv2 official documentation goes into some detail about setting users for Tenant creation – however it does not state what to do for Distribution Groups – further it doesn’t state how to make Mail enabled Distribution Groups work within the Lync client if a tenant already has Exchange, and enables Lync as a add-on later. Which is especially relevant seeing Lync 2013 LHPv2 has come to market later than Exchange 2013.

Because no documentation or blog exists flat out ANYWHERE on the Internet for this, I thought it a worthy addition to my 2014 blogs!

I also want to state this is Part 1 of a 3 part overview of Distribution Groups in LHPv2.

This part, Part 1, will cover the entire end to end process for making Distribution Groups show up, expand and work in the Lync client for an LHPv2 tenant.

Part 2 – this will cover automating the steps required in Active Directory on a per tenant basis

Part 3 – this will cover automating the steps required in SQL Server on a per tenant basis.

As you can see by Part 3 both the technical detail and automated procedures should be in place to help with this process once and for all. Which is great if you have a tenant with 300 Distributions Groups!

Firstly, for anyone looking for the official Lync 2013 LHPv2 documentation it is here: http://www.microsoft.com/en-us/download/details.aspx?id=39101

I recommend reading it. Please also be aware it is sensible to have a sound understanding of Lync, Active Directory and SQL to really get the best of this break down. A sound understanding of LHPv2 (Again! Read the official documentation in the download link above!) is also a wise investment – take some time to read the documentation if you haven’t already, prior to proceeding.

Finally:

THESE STEPS ASSUME THE TENANT ALREADY HAS EXCHANGE AND HAS ENABLED LYNC AFTER. 

Please see the end of this post if this is vanilla Distribution Group creation.

  1. Ensure you have added themsRTCsipTenantIDand msRTCsipGroupingID attributes to the required distribution group. Copy them from a user within the tenant that is already created, or via the ObjectGUID of the tenants OU itself.
  1. It is a good idea to wait for AD replication to occur – especially if you are multi site and do not have change based notification enabled. Go grab a cup of coffee.
  1. Grab thedistinguishedNamefrom the Tenants OU in Active Directory:

  1. From the Exchange Management Shell run the following including the Tenants OUdistinguishedNamefrom the previous step:

    Get-DistributionGroup -OrganizationalUnit “distinguishedName here”

  2. As we can successfully retrieve the Tenants distribution groups back, we will now export this data:

    Get-DistributionGroup -OrganizationalUnit “distinguishedName here” |select guid |export-csv c:\GUIDExport.csv

    This will export all validObjectGUIDs of each Distribution Group to CSV:

  3. We now need to open SQL Management Studio on the SQL server that is hosting the rtcab database for address book query data. If you have a SQL mirror you can use the following command to work out which is the Principle and which is the Mirror:

    Get-CsDatabaseMirrorState -PoolFqdn “Your Front End Pool FQDN holding the CMS”

  4. Once in SQL Management Studio, search under ‘rtcab’ for the ‘RtcDeleteAbEntry’ Stored Procedure
  5. Take the first GUID from your exported CSV and create a new Query. Run the following:

    exec [dbo].[RtcDeleteAbEntry] ‘Enter GUID here’

  6. Finally Execute your SP. You will see the command completes successfully:
  7. Repeat this for the remaining GUIDs you have.
  8. Finally, open the Lync Management Shell and run:

    Update-CsAddressBook

    This will then start the process of trawling Active Directory and picking up these deleted Distribution Groups, and adding them back in with the correct multi tenant attributes.

  9. Once the above process has completed you should see the Distribution Group now working for your Tenant. This can take anything from 15 minutes to an hour or so depending on the size of your deployment.  Enjoy!

So that is the entire end to end process to fix broken Distribution Groups in Lync 2013 LHPv2.

I did say I would cover vanilla DL creation as a lot less work is required. These are the steps.

  1. Create your Distributions Groups – ensure they are NOT mail enabled at this point in time. This is very important, otherwise the Lync address book service will pick them up and add them to the rtcab database.
  2. Ensure you have added themsRTCsipTenantIDand msRTCsipGroupingID attributes to the required distribution group. Copy them from a user within the tenant that is already created, or via the ObjectGUID of the tenants OU itself.
  3. You are now free to mail enable them for Exchange use, wait for AD replication to occur from the previous step before doing this.
  4. Once the address book service has run, it will automatically add them to the tenant without anymore work. If you want to speed this process up, change the times your address book service runs (default is once every 24 hours), or invokeUpdate-CsAddressBookat your leisure. If you want to check the schedule, invoke Get-CsAddressbookConfiguration.

So that’s it, how to get Distribution Groups working in Lync 2013 LHPv2 in it’s entirety. If at this point you are still having issues, there’s two things to check:

The first: Ensure you are testing as an external user! Hit the external web services and not internal. I had issues with Internal Web Services, which is no surprise as LHPv2 has no concept of internal users.

The Second: Ensure Group Expansion is enabled. You can check this using Get-CsWebServiceConfiguration:

If it isn’t you can set it to True using the following command: Set-CsWebServiceConfiguration –EnableGroupExpansion $true

Archives