Error “Unable to obtain DNS hostname of Active Directory domain controller with ntdsa object name..” when opening CRM Deployment Manager

Hi,

Just came up with this same error twice so I decided to share what worked for me in both cases.

 

[ERROR]

After installing Dynamics CRM, when opening Deployment Manager, the following Exception arises: “Unable to obtain DNS hostname of Active Directory domain controller with ntdsa object name …

 

mmc

Stack trace

Unable to obtain DNS hostname of Active Directory domain controller with ntdsa object name "CN=NTDS Settings,CN=CRM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=mydomain,DC=com".
Exception type:
System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException
at System.DirectoryServices.ActiveDirectory.Utils.GetReplicaList(DirectoryContext context, String partitionName, String siteName, Boolean isDefaultNC, Boolean isADAM, Boolean isGC)
at System.DirectoryServices.ActiveDirectory.DomainController.FindAllInternal(DirectoryContext context, String domainName, Boolean isDnsDomainName, String siteName)
at System.DirectoryServices.ActiveDirectory.Domain.get_DomainControllers()
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.QueryDomainControllers(Domain currentDomain, String accountName)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.GetCaseSafeName(String domain, String accountName)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.GetCaseSafeName(String name)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.GetIdsFromName(String userName)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SecurityRoleService.TryVerifyUser(String userName, SecurityRole role)
at Microsoft.Crm.Tools.Admin.SystemUserController.TryVerifyUser()
at Microsoft.Crm.Tools.Admin.DMSnapInHelper.DisplayMessageBoxIfCurrentUserIsNotSystemUser(Console console)
at Microsoft.Crm.Tools.Admin.DMSnapIn.OnInitialize()
at Microsoft.ManagementConsole.SnapInBase.Initialized()
at Microsoft.ManagementConsole.Internal.SnapInClient.Microsoft.ManagementConsole.Internal.ISnapInClient.Initialize(ISnapInPlatform snapInPlatform)
at Microsoft.ManagementConsole.Executive.SnapInInitializationOperation.OnStart()
at Microsoft.ManagementConsole.Executive.RunningOperationsTable.EnqueueOperation(Operation operation)
at Microsoft.ManagementConsole.Advanced.FrameworkSnapInFactory.Microsoft.ManagementConsole.Advanced.ISnapInFactory.CreateSnapIn(Int32 bookkeepingId, String snapInKey, Object& snapIn)

After closing the above window, the following error comes up and the MMC snap-in unloads:

 

mmc2

[SOLUTION]

What worked for me is to add the Preferred Domain Controller  value to MS CRM registry entries:HKLM\Software\Microsoft\MSCRM

For doing so, follow the next steps:

  • Step 1. Right Click and click on NewString value as "PreferredDc"
  • Step 2. Add the value to PreferredDc is YourDomainControllerName you can find this in your AD by typing the command in your cmd prompt echo %logonserver%

Hope it saves you some time,

PP [twitter: @pabloperalta]

7 Comments

Comments have been disabled for this content.