# Retrieving user details in bulk

**URL:** <https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278>\
**Category:** Questions\
**Created:** [February 20, 2018, 11:33am UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278 "2018-02-20T11:33:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad\_g\_parab](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@prasad\_g\_parab](https://devforum.okta.com/u/prasad_g_parab)\
**Post date:** [February 20, 2018, 11:33am UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/1 "2018-02-20T11:33:41Z")

</div>

Hi  
I am working on okta integration with my application using rest api.  
My requirement is I need to get information about user such as profile info, connected groups, connected apps, assigned admin roles.

Currently, I am fetching information by below steps

1. call /users endpoint to get userID
2. call /users/uid/groups endpoint to get all groups connected to user
3. call /users/uid/apps endpoint to get all apps connected to user
4. call /users/uid/roles endpoint to get all roles assigned to the user

From above steps, I get all required information but it requires 3/4 calls which hits the performance of application.

Any way or suggestion to get above information in minimum calls or in less time?

Regards,  
Prasad

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [February 20, 2018, 10:10pm UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/2 "2018-02-20T22:10:01Z")

</div>

The Okta SDKs have a caching layer built in, this would allow you to minimize and speed up the calls.

You could also run calls 2-4 asynchronously.

---

<div class="post-metadata">

**Author:** ![prasad\_g\_parab](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@prasad\_g\_parab](https://devforum.okta.com/u/prasad_g_parab)\
**Post date:** [February 21, 2018, 6:48am UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/3 "2018-02-21T06:48:31Z")

</div>

Thanks @tom for reply

Can you please point me to any reference document about how the caching mechanism works in okta SDK?

I found[documentation about how to create cache.](https://developer.okta.com/okta-sdk-java/development/apidocs/com/okta/sdk/client/ClientBuilder.html)

But I am interested in the details like what data cache is storing and how cached data reused?

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [February 21, 2018, 9:25pm UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/4 "2018-02-21T21:25:19Z")

</div>

You can specify what is cached like such:

```auto
Caches.newCacheManager()
     .withDefaultTimeToLive(300, TimeUnit.SECONDS) // default
     .withDefaultTimeToIdle(300, TimeUnit.SECONDS) //general default
     .withCache(forResource(Account.class) //Account-specific cache settings
         .withTimeToLive(1, TimeUnit.HOURS)
         .withTimeToIdle(30, TimeUnit.MINUTES))
     .withCache(forResource(Group.class) //Group-specific cache settings
         .withTimeToLive(2, TimeUnit.HOURS))

```

The cache will cache everything returned by okta under the key of the self-link. We need to be able to materialize the full objects with links.

How it is used is when the request executor is making a request to a resource, it can check the cache for an object with the can link (the self-link), before flighting a request to the okta service.

I hope this information helps!

---

<div class="post-metadata">

**Author:** ![prasad\_g\_parab](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@prasad\_g\_parab](https://devforum.okta.com/u/prasad_g_parab)\
**Post date:** [February 23, 2018, 5:44am UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/5 "2018-02-23T05:44:45Z")

</div>

Sounds good.  
Just one question I saw there is a group called “Everyone” and every user created in okta is by default member of everyone group.

So is it a fair statement that every okta instance have everyone group which hold each and every user exists on okta? also is there any way to modify this settings?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 9:36pm UTC](https://devforum.okta.com/t/retrieving-user-details-in-bulk/1278/6 "2024-01-12T21:36:38Z")

</div>

Closed on January 12, 2024, 9:36pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
