大网数据广告活动
域与目录服务

LDAPS connection fails with event ID 36884

· 52CE 我爱测

Introduce how to troubleshoot event ID 36884 that occurs during LDAPS connections.

This article introduces how to troubleshoot the event ID 36884 issue that occurs when you try to build a Lightweight Directory Access Protocol (LDAP) connection.

Issue scenario and event log

Consider the following scenario:

  • You installed a certificate on an LDAPS connection point.
  • The certificate has the following characteristics:
    • Subject: ldap.contoso.com
    • Subject Alternate Name (SAN): ldap.contoso.com
  • In the DNS server, you have the following entries:
    • ldap.contoso.com CNAME myldapserver.contoso.com
    • myldapserver.contoso.com HOST 10.0.0.1

When you try to connect to the LDAPS connection point, the connection is dropped, and you receive event ID 36884.

Log Name:      System
Source:        Schannel
Date:          <date_and_time>
Event ID:      36884
Task Category: None
Level:         Error
Keywords:      
User:          CONTOSO\<user_name>
Computer:      <computer_name>
Description:
The certificate received from the remote server does not contain the expected name. It is therefore not possible to determine whether we are connecting to the correct server. The server name we were expecting is <computer_name>. The TLS connection request has failed. The attached data contains the server certificate.
The SSPI client process is ldp (PID: 5148).

Cause

LDAPS is looking for myldapserver.contoso.com to be associated with it. However, myldapserver.contoso.com isn't covered by the SAN entries. Therefore, a server name match isn't made, and the connection is dropped.

How to fix the issue

To fix this issue, use one of the following solutions:

  • Use extra SAN(s) to cover the resolved HOST names on the certificate.

  • Use a HOST record in DNS instead of the CNAME record.

  • Configure the following registry value on the client to use the CNAME for the server name comparison.

    [!IMPORTANT] This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.

    1. Start Registry Editor.
    2. Locate the following subkey in the registry:
      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP
    3. Create a new REG_DWORD value that is named UseHostnameAsAlias, and set the value to anything other than zero.
    4. Exit Registry Editor, and then restart the computer.

    After the registry value is configured, the client computer uses ldap.contoso.com to make the match. It's covered by the certificate SANs, so the connection is allowed.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。