ashep
ashep12mo ago

Getting "User could not be found (QUERY-Dfbg2)" upon session creation for existing user

Hello! I have a self-hosted ZITADEL v2.59.5 installation with Postgres. I have created a user with a username that is unique across the entire instance. When I am calling POST /v2/sessions API with the following payload:
{
"checks": {
"user": {
"loginName": "theusername"
}
}
}
{
"checks": {
"user": {
"loginName": "theusername"
}
}
}
I am getting the following error:
{
"code": 5,
"message": "User could not be found (QUERY-Dfbg2)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "QUERY-Dfbg2",
"message": "User could not be found"
}
]
}
{
"code": 5,
"message": "User could not be found (QUERY-Dfbg2)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "QUERY-Dfbg2",
"message": "User could not be found"
}
]
}
All other users can create sessions without problems. Can someone point me out what to check in my installation to find the source of this problem and how to fix it. Thanks a lot!
2 Replies
fabienne
fabienne12mo ago
can you quickly check in the management console on that user how the loginname looks? is it exactly the same as the usernma?
ashep
ashepOP12mo ago
Is "loginname" the field "Login methods" that I see in UI? If yes, then - yes. Values of "User Name", "Login methods" and even "email" fields are the same. I've double-checked this using web-browser search feature via "Cmd+F". UPD If I click the "Modify User Name" button in UI and add just an underscore symbol, the session create request works fine (with the old username, i.e., without an underscore). If I then remove the underscore, I get the error again. If I do the same with the user's email instead of the username, it doesn't work. I hope this additional info will help. 🙏🏻

Did you find this page helpful?