John Yassa's Blog

Home » 2015 » May » 20

Daily Archives: May 20, 2015

Unable to Sync Hash of users’ password with Azure AD using AAD Sync service

After downloading the new Microsoft Azure Active Directory Sync Services (AADSync tool) from the URL Download, i faced a very wired issue, all functions was working properly syncing to the cloud from on premise and also write back password was working fine except the Password synchronization to the cloud , it was not working at all  even after the full initial sync

I found the below event log in the application log

Log Name: Application
Source: Directory Synchronization
Date: 5/5/2015 12:50:50 PM
Event ID: 611
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: AADsyncserver1.xxxxxxx.com
Description:
Password synchronization failed for domain: xxxxxxx.com. Details:
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —> Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —> System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer<_SEC_WINNT_AUTH_IDENTITY_W> authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.<>c__DisplayClass1.<ExecuteWithRetry>b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —> Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —> System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer<_SEC_WINNT_AUTH_IDENTITY_W> authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.<>c__DisplayClass1.<ExecuteWithRetry>b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —> Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —> System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer<_SEC_WINNT_AUTH_IDENTITY_W> authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.<>c__DisplayClass1.<ExecuteWithRetry>b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
.

xxxxxxx.com
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”&gt;
<System>
<Provider Name=”Directory Synchronization” />
<EventID Qualifiers=”0″>611</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2015-05-05T09:50:50.000000000Z” />
<EventRecordID>15413</EventRecordID>
<Channel>Application</Channel>
<Computer>QinvestADSYNC01.xxxxxxx.com</Computer>
<Security />
</System>
<EventData>
<Data>Password synchronization failed for domain: xxxxxxx.com. Details:
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —&gt; Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —&gt; System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer&lt;_SEC_WINNT_AUTH_IDENTITY_W&gt; authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.&lt;&gt;c__DisplayClass1.&lt;ExecuteWithRetry&gt;b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —&gt; Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —&gt; System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer&lt;_SEC_WINNT_AUTH_IDENTITY_W&gt; authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.&lt;&gt;c__DisplayClass1.&lt;ExecuteWithRetry&gt;b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
Microsoft.Online.PasswordSynchronization.SynchronizationManagerException: Unable to open connection to domain: xxxxxxx.com. Error: There was an error creating the connection context. —&gt; Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsException: There was an error creating the connection context. —&gt; System.MissingMethodException: Method not found: ‘IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)’.
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnectionContext.CreateDrsHandle(Void* rpcBindingHandle, SafePointer&lt;_SEC_WINNT_AUTH_IDENTITY_W&gt; authHandle)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsRpcConnection.CreateConnectionContext(SourceDomainController sourceDomain)
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.EstablishConnection()
at Microsoft.Online.PasswordSynchronization.DirectoryReplicationServices.DrsConnection.Connect()
at Microsoft.Online.PasswordSynchronization.RetryUtility.&lt;&gt;c__DisplayClass1.&lt;ExecuteWithRetry&gt;b__0()
at Microsoft.Online.PasswordSynchronization.RetryUtility.ExecuteWithRetry[T](Func`1 operation, Func`1 shouldAbort, RetryPolicyHandler retryPolicy)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
— End of inner exception stack trace —
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.OpenConnection(IDrsConnection connection)
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.CreateConnection()
at Microsoft.Online.PasswordSynchronization.RecoveryTask.SynchronizeCredentialsToCloud()
at Microsoft.Online.PasswordSynchronization.PasswordSynchronizationTask.SynchronizeSecrets()
at Microsoft.Online.PasswordSynchronization.SynchronizationExecutionContext.SynchronizeDomain()
at Microsoft.Online.PasswordSynchronization.SynchronizationManager.SynchronizeDomain(SynchronizationExecutionContext syncExecutionContext)
.

xxxxxxx.com</Data>
</EventData>
</Event>

 

ِAfter a long time of troubleshooting and contacting Microsoft support here is what we got

Cause: Essential component required by the password sync engine was not installed; The generic version of “GetFunctionPointerForDelegate” only exists in .Net 4.5.1 and later

Resolution: Installing .net 4.5.2 and latest .net live updates.

 

%d bloggers like this: