Microsoft Azure AD Sync Service will not start fresh/new install

Colin Slaughter 20 Reputation points
2024-12-21T00:49:27.55+00:00

Downloaded the latest Microsoft Entra Connect. Installed it on a non-domain controller. Problem is the Microsoft Azure AD Sync service will not start. I have done all of Microsoft's trouble shooting by changing the group policy security settings and verifying everything is set correctly.

It just refuses to start, if you give it like 30 minutes it will give up. The only thing I can find in the event viewer is error 2005:

"The ADSync service failed to successfully start and is attempting to retry the operation.

Additional Details

Failure Code: 0x8023044a

OriginalError=0x80004005 OLEDB Provider error(s):

Description = 'Login timeout expired'

Failure Code = 0x80004005

Minor Number = 0

Description = 'A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.'

Failure Code = 0x80004005

Minor Number = -1983577849

Description = 'SQL Server Network Interfaces: '

Failure Code = 0x80004005

Minor Number = -1983577849 "

So it looks like it is not installing the SQL service as I don't see it in the services list anywhere. I choose the express install option when installing.

I have done this on two different servers with the exact same result. Tried re-installing several times.

Does anyone know what I am doing wrong, or is there something wrong with the installer?

Microsoft Entra
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 14,161 Reputation points
    2024-12-21T16:44:10.1666667+00:00

    Hello Colin Slaughter,

    Follow, I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: Customer is having issue with Microsoft Azure AD Sync Service while not start fresh and new installation.

    Error Message: Error 2005: "The ADSync service failed to successfully start and is attempting to retry the operation.

    Additional Details

    Failure Code: 0x8023044a

    OriginalError=0x80004005 OLEDB Provider error(s):

    Description = 'Login timeout expired'

    Failure Code = 0x80004005

    Minor Number = 0

    Description = 'A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.'

    Failure Code = 0x80004005

    Minor Number = -1983577849

    Description = 'SQL Server Network Interfaces: '

    Failure Code = 0x80004005

    Minor Number = -1983577849 "

    CannotVerifyCopySource" Error while using AzCopy between Blob Storage

    Solution: Customer tracking this down and discovered the issue was that the installation does not work with redirected profiles. The group policy was redirecting both Domain and local profiles to a network location. Once it was corrected for the local profiles it installed without issues.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Sina Salam 14,161 Reputation points
    2024-12-21T03:50:02.87+00:00

    Hello Colin Slaughter,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having error 2005: The ADSync service failed to successfully start and is attempting to retry the operation.

    The error suggests that the Microsoft Entra Connect Sync service is failing to connect to a SQL Server instance during startup. This is likely because:

    1. SQL Server Express or LocalDB didn't install or configure correctly during the Entra Connect setup.
    2. The Sync service is trying to connect to a non-existent or misconfigured SQL instance.

    Below are the steps to resolve this issue:

    1. The Sync service relies on SQL Server Express (or a manually specified SQL Server instance) installed during setup. First, confirm whether SQL Server is correctly installed and running.
    • Open the Services console (services.msc) and look for:
      • MSSQL$ADSync (SQL Server for Entra Connect).
      • ADSync (the Azure AD Sync Service).

    If these services are missing, SQL Server installation likely failed. I recommend that you uninstall Microsoft Entra Connect, remove any residual files, and attempt the installation again.

    1. Ensure the required SQL Server instance (localhost\ADSync or similar) is present.

    Open SQL Server Management Studio (SSMS) and connect to the server:

    Server name: .\ADSync or localhost\ADSync

    Authentication: Windows Authentication

    If connection fails, the SQL Server instance might not exist or may need to be repaired.

    Also, recommend that if no SQL instance is available, proceed to reinstall SQL Server Express manually - https://www.microsoft.com/en-us/sql-server/sql-server-downloads

    1. Manually install SQL Server Express if the automatic setup failed.
    • Download SQL Server Express from the official website.
    • Choose default installation settings unless specific configurations are needed.
    • During Microsoft Entra Connect installation:
      • Select the Custom option.
      • Provide the details of the manually installed SQL Server instance.
    • For example, if you need code: Installation Command for SQL Express.

    SQLEXPR_x64_ENU.exe /QUIET /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=ADSync /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"

    1. If SQL Server is installed but the service cannot connect, verify network configurations.
    2. Open SQL Server Configuration Manager.
    3. Enable TCP/IP under SQL Server Network Configuration.
    4. Restart the SQL Server service.
    • Open SQL Server Configuration Manager.
    • Enable TCP/IP under SQL Server Network Configuration.
    • Restart the SQL Server service.
    • And for Firewall Rule for SQL Server, Run the following command to open the necessary ports:

    netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433

    1. Review detailed logs in the Event Viewer:
    • Navigate to Windows Logs > Application.
    • Look for errors related to ADSync or SQL Server.

    I recommend that you check the error details to refine your troubleshooting steps or identify missing components.

    1. If the above steps fail, reset the installation:
    • Uninstall Microsoft Entra Connect.
    • Remove leftover folders (C:\Program Files\Microsoft Azure AD Sync).
    • Clean the registry:
      • Open regedit.
      • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products and delete entries related to Entra Connect.
    • Reinstall Entra Connect, ensuring SQL Server is properly installed or manually configured. Warning: Editing the registry can cause system issues. Proceed with caution.

    Alternative solution if these steps don't resolve the issue:

    1. Instead of relying on SQL Server Express, install a full SQL Server Standard or Enterprise edition for better control over the setup.
    2. If reinstallation fails, collect all error logs and open a support case with Microsoft for detailed diagnostic assistance.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


  2. Colin Slaughter 20 Reputation points
    2024-12-21T16:26:37.9933333+00:00

    Tracking this down. The issue was that the installation does not like redirected profiles.

    Our group policy was redirecting both Domain and local profiles to a network location. Once it was correct not to for the local profiles it installed without issues.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.