# Test User being unexpectedly disabled with error "user\_disabled"

**URL:** <https://forum.keycloak.org/t/test-user-being-unexpectedly-disabled-with-error-user-disabled/31376>\
**Category:** Getting advice\
**Tags:** testing\
**Created:** [May 20, 2026, 4:53pm UTC](https://forum.keycloak.org/t/test-user-being-unexpectedly-disabled-with-error-user-disabled/31376 "2026-05-20T16:53:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyspoon](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@andyspoon](https://forum.keycloak.org/u/andyspoon)\
**Post date:** [May 20, 2026, 4:53pm UTC](https://forum.keycloak.org/t/test-user-being-unexpectedly-disabled-with-error-user-disabled/31376/1 "2026-05-20T16:53:01Z")

</div>

Hi all. Our web app uses KeyCloak 26.3.2 and we run smoke tests against the app. These smoke tests use the same user each time via a GitHub action. Sometimes the user gets Disabled but I don’t understand why.

In the user events list I see successful logins and then logouts which align with test runs. Then, sometimes, on the next log in it fails with an error “`user_disabled`” I can’t see an event in the logs that shows when or why the user was set to be disabled. We have to flip the toggle to re-enable the user.

I wonder if it is anything to do with brute force detection despite the user logging in ok normally (no events saying incorrect password or quick fire token refreshes):

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/0/0d151949cb0e8b0af19c64930d883ff99572d1fc.png)

These are the settings:

Mode: Lockout permanently, Max failures: 5 Quick check ms: 1000 Minimum wait: 1 min

I’ve been round the houses with Claude and I’m not getting very far, hoping I can get some help from a real live expert! 🙏

Any suggestions or guidance would be appreciated 🙂

Thanks,

Andy
