I am encountering an error while running Microsoft Azure Active Directory sync. The error message indicates "An error occurred while sending the request."
Environment:
- OS: Windows Server 2022 Standard
- TLS 1.2: Enabled
- Proxy: Not in use
- Using latest version of Azure AD Connect (2.3.20.0)
Here are the relevant details from the logs
=== Token Acquisition finished successfully:
[09:12:50.575] [ 54] [INFO ] MSAL: False MSAL 4.36.0.0 MSAL.Desktop 4.8 or later Windows Server 2022 Standard [08.05 09:12:50.57 - 77f0f48a-d6c3-4d9f-88ca-8ed4f45412b2] AT expiration time: 05.08.2024 10:30:48 +00:00, scopes https://proxy.cloudwebappproxy.net/registerapp/user_impersonation source IdentityProvider from login.microsoftonline.com appHashCode 8351884
[09:12:50.576] [ 51] [INFO ] Authenticate-MSAL: successfully acquired an access token. TenantId=354e4081-8121-4b0f-b318-c1bd2a901762, ExpiresUTC=05.08.2024 10:30:48 +00:00, UserInfo=xxx, IdentityProvider=login.windows.net.
[09:12:50.597] [ 51] [INFO ] EnableDesktopSsoTask: desktopsso is currently False.
[09:12:50.597] [ 51] [INFO ] EnableDesktopSsoTask: desktopsso policy is still disabled. Skipping task
[09:12:50.597] [ 51] [INFO ] Task 'Setting DesktopSso enablement' has finished execution
[09:12:50.600] [ 53] [INFO ] Task 'Setting DesktopSso enablement' finished successfully
[09:12:50.600] [ 53] [VERB ] Executing task Check Installed Components
[09:12:50.602] [ 56] [INFO ] Task 'Check Installed Components' has finished execution
[09:12:50.602] [ 53] [INFO ] Task 'Check Installed Components' finished successfully
[09:12:50.602] [ 53] [VERB ] Executing task Deploy AAD Sync
[09:12:50.627] [ 57] [VERB ] Executing task Configure AAD Sync
[09:12:50.648] [ 58] [INFO ] SyncDataProvider:LoadSettings - loading context with global settings.
[09:12:50.648] [ 58] [INFO ] SyncDataProvider:LoadSettings - retrieving global settings from the sync engine.
[09:12:50.763] [ 58] [ERROR] Unable to get value for Microsoft.OptionalFeature.EnableAutoUpgrade global parameter.
[09:12:50.763] [ 58] [INFO ] SyncDataProvider:LoadSettings - retrieving connector from the sync engine.
[09:12:50.866] [ 58] [INFO ] Enabling Staging Mode.
[09:12:51.245] [ 58] [INFO ] ConfigureAADSyncTask.CreateNewConnectors [Azure]: Pre-creating the Azure connector with retryOnFailure: true.
Exception Data (Raw): System.Management.Automation.CmdletInvocationException: An error occurred while sending the request. ---> Microsoft.IdentityManagement.PowerShell.ObjectModel.SynchronizationConfigurationValidationException: An error occurred while sending the request.
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.ValidateConfigurationParameters(Connector connector)
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.CreateConnector(Connector connector, Boolean validate)
at Microsoft.IdentityManagement.PowerShell.Cmdlet.AddADSyncConnectorCmdlet.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.Online.Deployment.PowerShell.LocalPowerShell.Invoke()
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.TypeDependencies.InvokePowerShell(IPowerShell powerShell)
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.InvokePowerShellCommand(String commandName, InitialSessionState initialSessionState, IDictionary`2 commandParameters, Boolean isScript)
at Microsoft.Azure.ActiveDirectory.Synchronization.PowerShellConfigAdapter.ConnectorConfigAdapter.AddConnector(Connector connector)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnectorCore()
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnector(IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
at Microsoft.Online.Deployment.Types.Providers.SyncDataProvider.CreateConnectorWithRetry(ConnectorAdapterBase connectorAdapter, IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
[09:13:21.466] [ 58] [ERROR] Creation of connector xxx - AAD failed. This may be due to replication delay. Retrying after 5 seconds ...
Exception Data (Raw): System.Management.Automation.CmdletInvocationException: An error occurred while sending the request. ---> Microsoft.IdentityManagement.PowerShell.ObjectModel.SynchronizationConfigurationValidationException: An error occurred while sending the request.
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.ValidateConfigurationParameters(Connector connector)
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.CreateConnector(Connector connector, Boolean validate)
at Microsoft.IdentityManagement.PowerShell.Cmdlet.AddADSyncConnectorCmdlet.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.Online.Deployment.PowerShell.LocalPowerShell.Invoke()
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.TypeDependencies.InvokePowerShell(IPowerShell powerShell)
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.InvokePowerShellCommand(String commandName, InitialSessionState initialSessionState, IDictionary`2 commandParameters, Boolean isScript)
at Microsoft.Azure.ActiveDirectory.Synchronization.PowerShellConfigAdapter.ConnectorConfigAdapter.AddConnector(Connector connector)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnectorCore()
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnector(IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
at Microsoft.Online.Deployment.Types.Providers.SyncDataProvider.CreateConnectorWithRetry(ConnectorAdapterBase connectorAdapter, IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
--- End of inner exception stack trace ---
at Microsoft.Online.Deployment.Framework.Workflow.WorkflowTaskGroup.CheckTaskCompletion(Int32 currentTaskIndex)
[09:17:56.386] [ 57] [VERB ] Cleanup: Starting cleanup for task 'Configure AAD Sync'
[09:17:56.386] [ 57] [VERB ] Task 'Configure AAD Sync': No cleanup defined
[09:17:56.387] [ 57] [INFO ] Task 'Deploy AAD Sync' has finished execution
[09:17:56.387] [ 53] [ERROR] Task failed without an exception
[09:17:56.388] [ 53] [VERB ] Cleanup: Starting cleanup for task 'Deploy AAD Sync'
[09:17:56.388] [ 53] [VERB ] Task 'Deploy AAD Sync': No cleanup defined
[09:17:56.388] [ 53] [VERB ] Marking task 'Deploy AAD Health Agent' as Skipped
[09:17:56.388] [ 53] [VERB ] Rolling back task Check Installed Components
[09:17:56.388] [ 53] [VERB ] Task 'Check Installed Components': No rollback defined
[09:17:56.388] [ 53] [VERB ] Rolling back task Setting DesktopSso enablement
[09:17:56.388] [ 53] [VERB ] Task 'Setting DesktopSso enablement': No rollback defined
[09:17:56.388] [ 53] [INFO ] Task 'Single Forest Dir Sync Pwd Sync Root Task' has finished execution
[09:17:56.419] [ 17] [ERROR] An error occurred while sending the request.
Exception Data (Raw): System.Management.Automation.CmdletInvocationException: An error occurred while sending the request. ---> Microsoft.IdentityManagement.PowerShell.ObjectModel.SynchronizationConfigurationValidationException: An error occurred while sending the request.
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.ValidateConfigurationParameters(Connector connector)
at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.CreateConnector(Connector connector, Boolean validate)
at Microsoft.IdentityManagement.PowerShell.Cmdlet.AddADSyncConnectorCmdlet.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.Online.Deployment.PowerShell.LocalPowerShell.Invoke()
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.TypeDependencies.InvokePowerShell(IPowerShell powerShell)
at Microsoft.Online.Deployment.PowerShell.PowerShellAdapter.InvokePowerShellCommand(String commandName, InitialSessionState initialSessionState, IDictionary`2 commandParameters, Boolean isScript)
at Microsoft.Azure.ActiveDirectory.Synchronization.PowerShellConfigAdapter.ConnectorConfigAdapter.AddConnector(Connector connector)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnectorCore()
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)
at Microsoft.Azure.ActiveDirectory.Synchronization.Config.ConnectorAdapterBase.CreateOrUpdateConnector(IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
at Microsoft.Online.Deployment.Types.Providers.SyncDataProvider.CreateConnectorWithRetry(ConnectorAdapterBase connectorAdapter, IEnumerable`1 objectClassInclusions, IEnumerable`1 attributeNameInclusions, ParameterKeyedCollection connectorGlobalParameters, Boolean createRunProfile)
at Microsoft.Online.Deployment.PSModule.Tasks.AADSync.ConfigureAADSyncTask`1.CreateNewConnectors(TContext context)
at Microsoft.Online.Deployment.PSModule.Tasks.AADSync.ConfigureAADSyncTask`1.ConfigureSyncEngine(TContext context)
at Microsoft.Online.Deployment.PSModule.Tasks.AADSync.ConfigureAADSyncTask`1.Execute()
at Microsoft.Online.Deployment.Framework.Workflow.WorkflowTask.ExecuteWrapper()
[09:17:56.424] [ 17] [INFO ] MicrosoftOnlinePersistedStateProvider.Save: saving the persisted state file
[09:17:56.424] [ 17] [INFO ] MicrosoftOnlinePersistedStateProvider.UpdateFileProtection: updating file protection from the persisted state file: C:\ProgramData\AADConnect\PersistedState.xml, isAddProtection: False
[09:17:56.425] [ 17] [INFO ] MicrosoftOnlinePersistedStateProvider.UpdateFileProtection: updating file protection from the persisted state file: C:\ProgramData\AADConnect\PersistedState.xml, isAddProtection: True
[09:17:56.426] [ 17] [INFO ] PerformConfigurationPageViewModel.PerformWorkflowInstallationAndUpdateState: result of installation operations - Failed
[09:17:56.426] [ 17] [ERROR] ExecuteADSyncConfiguration: configuration failed. Skipping export of synchronization policy. resultStatus=Failed
[09:17:56.461] [ 17] [ERROR] PerformConfigurationPageViewModel: We encountered a problem and couldn’t complete the integration.
[09:17:56.461] [ 17] [ERROR] PerformConfigurationPageViewModel: An error occurred executing Configure AAD Sync task: An error occurred while sending the request.
[09:17:59.831] [ 1] [INFO ] Opened log file at path C:\ProgramData\AADConnect\trace-20240805-090530.log