Azure AD Conect - custom install problem - Specified cast is not valid

BartelAdamMTPLSBC-8682 1 Reputation point
2021-09-20T10:16:37.1+00:00

Hi,

I'm faced with migfration of Azure AD Connect from one server to another.
I have exported settings on one server, copied to another and during custom install I recieve an error like below:

Invalid Cast Exception
Specified cast is not valid

133510-aad-cast-not-valid.png

AAD Connect version - 1.6.13 - from this version od AD connect settings we're exported and to this version I try to import.

Log entries:
[11:59:14.875] [ 12] [INFO ] SyncEngineSetupViewModel: Validating sync engine settings.
[11:59:14.875] [ 13] [ERROR] A terminating unhandled exception occurred.
[11:59:14.875] [ 12] [INFO ] MigrateSynchronizationPolicy: Loading persisted settings (0).
Exception Data (Raw): System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Specified cast is not valid.
at Microsoft.Online.Deployment.OneADWizard.UI.Controls.SyncEngine.SyncEngineSetupViewModel.ValidateSettings(Boolean verifyDataDiskSpace)
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.InstallSyncEnginePageViewModel.StartNewInstallation(Boolean skipSyncEngineInstall)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidCastException: Specified cast is not valid.
at Microsoft.Online.Deployment.OneADWizard.UI.Controls.SyncEngine.SyncEngineSetupViewModel.ValidateSettings(Boolean verifyDataDiskSpace)
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.InstallSyncEnginePageViewModel.StartNewInstallation(Boolean skipSyncEngineInstall)
at System.Threading.Tasks.Task.Execute()<---

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,320 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Devaraj G 2,091 Reputation points
    2021-09-20T11:47:21.367+00:00

    Hi Adam,

    How are you migrating the AD connect form one server to another. the recommended practice is to put the new server in staging mode and switch over. Its pretty straight forward.

    Please refer this article for step-by-step. https://practical365.com/migrating-azure-ad-connect-new-server/


  2. Devaraj G 2,091 Reputation points
    2021-09-20T12:26:05.293+00:00

    HI Adam, what is the version of your new AD connect. is it 2.0.8.0. - looks this installer have some issues with config import .

    The same issue was solved in version 2.0.10.0 . Please give a try.

    Regards,
    Dev