2isprime
2isprime13mo ago

Getting total count of users in an Organization

Hello team, Is there an endpoint to get the total count of users in an organization ? The endpoint /v2/users has a limi set for 1000 records, what is the way to get the total count of users? TIA
6 Replies
fabienne
fabienne13mo ago
i think if you perform the seach users reqeust with the organizaiton id query, and you have more than 1000 users, you should see that in the result in the totalResult number
2isprime
2isprimeOP13mo ago
Thanks @fabienne , although I would want to get the total results independent of the limit and offset I set, example...in current response
{
"query": {
"offset": "1",
"limit": "2",
"asc": true
}
}
{
"query": {
"offset": "1",
"limit": "2",
"asc": true
}
}
For this the response contains
"details": {
"totalResult": "2",
"timestamp": "2024-08-23T13:13:21.716497Z"
},
"details": {
"totalResult": "2",
"timestamp": "2024-08-23T13:13:21.716497Z"
},
this is directly dependent on the limit I pass....is there a way to get the total users count....(the solution you provided above will not work if I have less than 1000 users right?) How can I get the count of users presnt in the system any api /logic ? Hello @fabienne , anything on this ⬆️ Hello @fabienne , is there any workaround for this?
fabienne
fabienne13mo ago
on which version do you run? we did a fix with the total result recently
2isprime
2isprimeOP13mo ago
self hosted zitadel v2.54.3
fabienne
fabienne13mo ago
can you try to upgrade to a newer version?
2isprime
2isprimeOP13mo ago
👍 , okay thanks

Did you find this page helpful?