A cloud-based identity and access management service for securing user authentication and resource access
The error indicates that the account used by the Azure AD/Entra ID Sync configuration wizard cannot authenticate to the on‑premises Active Directory (LDAP error 0x31 – invalid credentials) when trying to read the schema.
Use these checks and fixes, in order:
- Verify the AD credentials being entered
- Ensure the username and password are correct (no typos, expired password, or locked account).
- Confirm that the account has Enterprise Admin permissions in the forest that the sync server is joined to.
- To verify Enterprise Admin membership:
- On a domain controller (or a machine with RSAT), open Active Directory Users and Computers (
dsa.msc). - Right‑click the domain, select Find.
- In Name, type
enterprise admins, select Find Now. - Open Enterprise Admins, go to Members, and confirm the sync account is listed. If not, add it or use an account that is a member.
- On a domain controller (or a machine with RSAT), open Active Directory Users and Computers (
- Confirm the sync server can authenticate to AD
- The sync server must be joined to the same forest whose schema is being read and must be able to contact domain controllers.
- Check that:
- The server is domain‑joined to the correct AD forest.
- Network connectivity to domain controllers (LDAP/389, Kerberos, DNS) is working.
- If the server cannot authenticate to AD, the wizard will fail with authentication errors even if the credentials are correct.
- Check system and account prerequisites for the Directory Sync tool
- Ensure the server meets the Directory Sync tool requirements:
- 64‑bit Windows Server (2003 SP2 or later, or later supported OS).
- Joined to an AD domain in the forest to be synchronized.
- Not a domain controller.
- .NET Framework 3.5 or later installed.
- The user running the Configuration Wizard must be a member of the local MIIS Admins group created during installation.
- If credentials are correct but authentication still fails
- The issue can also occur when the sync server cannot properly authenticate with AD even though the account is valid.
- In that case, apply the same remediation used for error 1789 (authentication failure to AD) on the sync server:
- Restart the sync server and retry the wizard.
- If the problem persists, remove the server from the domain and rejoin it:
- Open System Properties → Computer Name → Change.
- Temporarily join a Workgroup, restart.
- Rejoin the correct Domain, restart again.
- After rejoining, rerun the Directory Sync Configuration Wizard and re‑enter the Enterprise Admin credentials.
- Rerun the Configuration Wizard
- After completing the steps above, rerun the wizard and:
- Use a verified Enterprise Admin account.
- Ensure the server is domain‑joined and can reach domain controllers.
- Confirm that the wizard no longer reports
failed-authenticationorInvalid Credentialswhen retrieving the schema.
These steps address the common root causes: incorrect/insufficient AD credentials and the sync server being unable to authenticate to or contact Active Directory.
References:
- Error when you try to run the Azure Active Directory Sync Tool Configuration wizard: The Enterprise Administrator credentials that you supplied are not valid
- Troubleshoot Azure Active Directory Sync tool installation and Configuration Wizard errors
- Error (LogonUser() Failed with error code: 1789) after you enter enterprise administrator credentials in the Azure Active Directory Sync tool Configuration Wizard
- Troubleshoot single sign-on setup issues in Office 365, Intune, or Azure