Sunday, July 29, 2018

Publish Topology fails with Duplicate objects in Active Directory AD SOLVED!

Publish Topology fails with Duplicate objects in Active Directory AD SOLVED!


Hi,

After the final steps of migrating from Lync2010 to Lync2013 we encountered some issues.
The response groups would not work.
Onnly the welcome message was played but then hangup.

When running Get-CsApplicationEndpoint it returned double for:
  • Announcement Service
  • RGS Presence Watcher
If you restart RGS service you will see this error in event viewer:


  • "Only one default routing endpoint is allowed per platform. The platform already contains a default routing Endpoint"


This is why the responsegroups is not working.
The duplicates had to be removed so we contected MS.

The solution was this. (If you will boldly og where no lync man has gone before)
First find the ID of the duplicates i.e.

  • ?"CN={37a1e0e8-cc9b-4473-a7cc-2ddcbc77f984},CN=Application contacts,CN=RTC Service,CN=Services,CN=Configuration,DC=veidekke,DC=net"


This is a neat command provided from Microsoft to help spot the duplicate entries:

CSVDE.exe -f c: emp tc_contacts.csv -d "CN=Application Contacts,CN=RTC Service,CN=Services,CN=Configuration,DC=DOMAIN,DC=COM" -r "(&(objectCategory=*)(msRTCSIP-PrimaryUserAddress=*RtcApplication*))"


This created a CSV file that listed all objects (and their attributes) with a msRTCSIP-PrimaryUserAddress value containing �RtCApplication� (in this case it was the two RGS objects and a few others like the audio test service, call park service, etc.). The file also included the �whenCreated� attribute which is how were able to spot the original objects between the duplicates. Of course, the location/attribute could be modified to list any object that you�re trying to find, so it could help identify other types of problems.

Then run ADSI-Edit.
Use the ID you found earlier to remove the duplicates.
Then restart announcementservice and RGS service. Important!
The error we saw earlier in eventviewer should now be gone.
This solved the case for us.


Update:
You can also run this in powershell from preferably a FrontEnd server:

Import-Module ActiveDirectory

Then

Get-ItemProperty -Path �AD:CN=*,CN=Trusted Services,CN=RTC Service,CN=Services,CN=Configuration,,DC=win,DC=Domain,DC=COM� -Name cn,msRTCSIP-TrustedServerFQDN,msRTCSIP-TrustedServiceType,objectClass,whenChanged | Group-Object -Property msRTCSIP-TrustedServerFQDN,msRTCSIP-TrustedServiceType | Where-Object {$_.Count -gt 1} | Select-Object -ExpandProperty Group | ?{$_.objectClass -eq �msRTCSIP-TrustedService�} | Select cn,msRTCSIP-TrustedServerFQDN,msRTCSIP-TrustedServiceType,whenChanged | Out-GridView

Change Domain (in red font) to your domain.
(You may also need to change CN if your are looking for other types of objects)


visit link download