[keycloak-user] Fetch user with administration REST API

Subodh Joshi subodhcjoshi82 at gmail.com
Fri Apr 20 01:49:44 EDT 2018


Hi

In our application we have pagination so i have to give query like this

http://<IP ADDRESS>:8080/<WEB-APP NAME>/tenants/T0/users?max=500&page=1

It worked perfectly .I have to give page because that a mandatory in my
case.

It may possible getting 10k record created issue and keycloak DB or
keycloak somehow hung due to that .

Exactly what exception you got?

On Thu, Apr 19, 2018 at 12:40 AM, Pakira, Ranjan <
ranjan.pakira at capgemini.com> wrote:

> Problem is that fetch users with "max" parameter value 10000 does not
> work. It means that if any search criteria returns around 10000 users it
> will fail.
>
>
>
> *From:* Pakira, Ranjan
> *Sent:* Thursday, April 19, 2018 12:35 AM
> *To:* Subodh Joshi
> *Cc:* keycloak-user; BISWAS, AYAN; Erdal, Jonatan; Hammarberg, Daniel
> *Subject:* RE: [keycloak-user] Fetch user with administration REST API
>
>
>
> No. it’s for nightly job.
>
> Yes there is way to manually calculate the offset and get the results.
>
> But I want to know if there is any way to get proxy of all users or to get
> all user ids/username.
>
>
>
> *From:* Subodh Joshi [mailto:subodhcjoshi82 at gmail.com
> <subodhcjoshi82 at gmail.com>]
> *Sent:* Wednesday, April 18, 2018 9:24 PM
> *To:* Pakira, Ranjan
> *Cc:* keycloak-user; BISWAS, AYAN; Erdal, Jonatan; Hammarberg, Daniel
> *Subject:* Re: [keycloak-user] Fetch user with administration REST API
>
>
>
> Millions of record you want to fetch in one go?
>
> Where you will store all those user ?
>
> It won't impact the performance of your app as well keycloak ?
>
> Why not you are using server side pagination to achieve this ?
>
>
>
> On Wed, 18 Apr 2018, 21:01 Pakira, Ranjan, <ranjan.pakira at capgemini.com>
> wrote:
>
> Hi,
> We are facing one issue to get users with administration REST API: GET
> /{realm}/users
> Default value of "max" parameter for this REST API is 100. In our database
> there are millions of users. But using the REST API we are unable to fetch
> all users, even if we set value of the "max" parameter to 10000, it is
> throwing following error:
>
> Exception in thread "main" java.lang.Exception:
> http://keycloak.skf.com/auth/admin/realms/SKF/users?max=10000 returns
> status code: 404
>
> Please let us know how to traverse all the users.
> Is there any way to fetch all the usernames or user ids other than
> fetching UserRepresentation?
>
> Thanks & Regards,
> Ranjan
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute,
> or use this message or any part thereof. If you receive this message in
> error, please notify the sender immediately and delete all copies of this
> message.
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>


-- 
Subodh Chandra Joshi
subodh1_joshi82 at yahoo.co.in
http://www.trendsinnews.com


More information about the keycloak-user mailing list