I inherited a project and it uses Java 1.8. I'm trying to make LDAP calls to authenticate users and keep getting the Error code 49. I'm doing it exactly the same as the 100's of Google results say I should and and I'm using the UPN ([email protected]) format but also tested passing the whole DN. The Administrator account actually works just fine. The test accounts that I added are not working though. I used the ldp.exe tool on the domain controller to verify that the username and password were in fact correct, but my code keeps telling me that its wrong. I'm thinking that there just has to be something about those accounts that are hanging them up that isn't hanging up the Administrator account.

Norm's user avatar

1

I'm not going to say this is "the answer" but it did solve the issue while adding another question. I noted that the Admin password was much more complex than the ones I was using for my test users. Mind you, AD never complained when I put those passwords in. But just for kicks I changed the password for all my test users to what my admin had and they all worked. Then I changed them back to what they were before and they still worked. I can only infer that what this means is that even though I didn't say that the user had to change their password for some reason Active Directory was giving off some kind of indication that the credentials weren't quite right. Hence the Code 49, sub code 52e.

Norm's user avatar

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

2026-03-25T00:00:44.853Z+00:00

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.