PVWA: Failed to connect to LDAP host "<host>" with user "<binduser>". Code(21, 49) (21)
Symptom
LDAP connections between Idira and a customer's LDAP environment fails, and the following code is observed in logs or PVWA settings: Failed to connect to the directory. Failed to connect to host, Reason: Failed to connect to LDAP host "<host>" with user "<binduser>". Code(21, 49) (21)
CyberArk's designated location for the bind account is inside the "VaultInternal" Safe, and it's possible for issues to occur between the customer's LDAP Active Directory environment and CyberArk's vaulted bind account object. The code 49 error listed above is what usually appears for bind-related issues.
Environment
Privilege Cloud Password Vault Web Access
-
Password Vault Web Access
-
LDAP Integration
Cause
This code 49 error appears when attempting to click “Apply” for the LDAP Integration settings to test the connection for LDAPS hosts for a customer’s tenant. It can also appear in Vault logs after experiencing a failed LDAP directory search from CyberArk's Safe members UI.
Code 21,49 Indicates an Active Directory (AD) AcceptSecurityContext error, which is returned when the bind account's username or user DN is invalid, or the username is valid, but the combination of password and user credential is invalid. This is the AD equivalent of LDAP error code 49.
It often indicates that there might be a username or password mismatch between the "VaultInternal" Safe's bind account and the actual bind account object in a customer's AD. If that object is locked in AD or has incorrect permissions or configurations there, that can cause the error too.
Resolution
Troubleshooting steps for resolution (this specific order of steps should be followed):
1. Provide Idira Support with the accurate username and DN of your Active Directory's bind account object so they can compare that with info in the "VaultInternal" Safe and LDAP Integration settings.
2. Log into your Privilege Cloud portal (PVWA) with a user that has permissions to show/retrieve the bind account's password.
3. Search your accounts for the bind account. It will be in the "VaultInternal" Safe.
4. Show the bind account's password and copy it.
5. Once you've copied the password, go into your Active Directory and find the bind account AD object.
6. Reset the AD object's password in your Active Directory using the password you copied from the "VaultInternal" Safe.
7. After updating the password for your bind account's AD object, please double check that all of the following are true:
• Bind account's AD object is not locked or disabled in your AD.
• Bind account's AD object is not set to expire in your AD.
• There is no mismatch in usernames between the AD object and the "VaultInternal" Safe's bind account.
• The bind account's AD object has Read-Only access to your domain and no other permissions.
8. If none of the above resolves the issue, check that the bind account credentials are valid by using its username and password with Microsoft's LDP.exe tool and attach complete screenshots of the tool's results to the support case.
Microsoft's LDP tool is natively installed on Domain Controllers. It's also included in Microsoft's Remote Server Administration Tools (RSAT). You'll need to engage Microsoft Support if you need assistance with the LDP tool and its related processes or documentation.