Error 0x31 invalid credential reinstalling Entra connect

Paolo Menzaghi 0 Reputation points
2025-07-02T14:17:16.8066667+00:00

Hello everyone

I've got an issue with the msol sync user so i've decide to reinstall entra connect.

Unfortunately I've error entra connect failed to retrieve schema error code 0x31 invalid credential also if credentials are valid. The connector is installed on a domain controller, and in the installation wizard I enter the same account with which I am connected to the server in rdp (that is the default AD administrator account) so the credential are valid

this is a transcript of the trace

[15:50:02.809] [ 1] [ERROR] Error getting domain reachability status for forest mydomain.local, exception: System.NullReferenceException: Object reference not set to an instance of an object.

[15:52:05.409] [ 12] [ERROR] ConfigSyncDirectoriesPage: Caught exception while creating the connector for directory: mydomain.local

Exception Data (Raw): System.Management.Automation.CmdletInvocationException: Failed to retrieve schema.<error><error><incident><connection-result>failed-authentication</connection-result><date>2025-07-02 13:52:05.286</date><server>mydomain.local:389</server><cd-error><error-code>0x31</error-code>

<error-literal>Invalid Credentials</error-literal>

</cd-error></incident></error></error> ---> Microsoft.IdentityManagement.PowerShell.ObjectModel.SynchronizationConfigurationValidationException: Failed to retrieve schema.<error><error><incident><connection-result>failed-authentication</connection-result><date>2025-07-02 13:52:05.286</date><server>mydomain.local:389</server><cd-error><error-code>0x31</error-code>

<error-literal>Invalid Credentials</error-literal>

</cd-error></incident></error></error>

at Microsoft.DirectoryServices.MetadirectoryServices.UI.WebServices.MMSWebService.GetSchemaFromDirectory(Connector connector, Boolean commit)

at Microsoft.IdentityManagement.PowerShell.Cmdlet.UpdateADSyncConnectorSchemaCmdlet.ProcessRecord()

can someone help me pls?

thanks in advance

Paolo

Microsoft Security | Microsoft Entra | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kancharla Saiteja 6,060 Reputation points Microsoft External Staff Moderator
    2025-07-07T16:53:30.1+00:00

    Hi @Paolo Menzaghi,

    Based on your query, I believe you are having an issue with Entra connect configuration.

    The error specified comes up when your domain is not reachable. Please check your DNS is configured properly and the ports are open. Make sure your server where Entra connect installed is joined to your domain and is reachable. Port 389 should be open for the connectivity. Kindly ensure the domain name is properly specified (. local or .com) suffix. TLS 1.2 is enabled on your server, or you can use this document: TLS 1.2 enforcement for Microsoft Entra Connect. If this does not help you, kindly share me the error screenshot to check further accordingly.


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.