# Unable to login to keycloak that's been integrated with AD with LOGIN\_ERROR clientId=null messages

**URL:** <https://forum.keycloak.org/t/unable-to-login-to-keycloak-thats-been-integrated-with-ad-with-login-error-clientid-null-messages/29269>\
**Category:** Miscellanaeous\
**Created:** [December 18, 2024, 5:50am UTC](https://forum.keycloak.org/t/unable-to-login-to-keycloak-thats-been-integrated-with-ad-with-login-error-clientid-null-messages/29269 "2024-12-18T05:50:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moonyi](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@moonyi](https://forum.keycloak.org/u/moonyi)\
**Post date:** [December 18, 2024, 5:50am UTC](https://forum.keycloak.org/t/unable-to-login-to-keycloak-thats-been-integrated-with-ad-with-login-error-clientid-null-messages/29269/1 "2024-12-18T05:50:40Z")

</div>

Hi

I am unable to login to Keycloak that’s been integrated with ADDS. The test connection and authentication have been confirmed working. I could fetch all users from active directory to keycloak. The issue is when I try to login using those users (user1, user2, user3 etc), I am unable to login and the login windows keeps shown and I also get the below error message as well.

Any help is appreciated.

[org.keycloak.events] (default task-51) type=LOGIN\_ERROR, realmId=3247c2af-981c-4ad5-a690-f5a3e8517e51, clientId=account-console, userId=null, ipAddress=0:0:0:0:0:0:0:1, error=invalid\_user\_credentials, reason=‘illegal negotiate token’, auth\_method=openid-connect, auth\_type=code, response\_type=code, redirect\_uri=[https://localhost/auth/realms/TestWare/account/#/security/signingin](https://localhost/auth/realms/TestWare/account/#/security/signingin), code\_id=653a233e-2e8e-4c43-84cb-807ffbe4ecb3, response\_mode=fragment, authSessionParentId=653a233e-2e8e-4c43-84cb-807ffbe4ecb3, authSessionTabId=bJ1wW6IuKdQ

---

<div class="post-metadata">

**Author:** ![regilero](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/regilero/32/5411_2.png) [@regilero](https://forum.keycloak.org/u/regilero)\
**Post date:** [January 2, 2025, 3:31pm UTC](https://forum.keycloak.org/t/unable-to-login-to-keycloak-thats-been-integrated-with-ad-with-login-error-clientid-null-messages/29269/2 "2025-01-02T15:31:25Z")

</div>

> [@moonyi](#):
>
> illegal negotiate token

This is a strange error message, do you have some custom code on your keycloak, something that might generate this error message?

---

<div class="post-metadata">

**Author:** ![moonyi](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@moonyi](https://forum.keycloak.org/u/moonyi)\
**Post date:** [January 3, 2025, 4:59am UTC](https://forum.keycloak.org/t/unable-to-login-to-keycloak-thats-been-integrated-with-ad-with-login-error-clientid-null-messages/29269/3 "2025-01-03T04:59:23Z")

</div>

No particular custom code, except the keycloak is integrated as part of another application.
