Extra API Call to okta if I called UserList.iterator() twice in a row.
See original GitHub issueAssuming we get a userList below:
UserList userList = client.listUsers(null, null, null, searchUserCriteria, null);
When we first time to invoke iterator()
, it returns a normal iterator containing all items in the list.
But if we call iterator()
, single()
, stream()
or for(User u: UserList)
again, it’ll make another api call to okta.
e.g.
Iterator<User> iterator = userList.iterator();
if (!iterator.hasNext()) {
return null;
}
return userList.single();
The above code makes two api calls to okta for /api/v1/users
. It eventually doubles our traffic which makes us hit the api rate limits unexpectedly.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Number of records returned when calling okta calls with stream
When I call userList.stream().collect(toList()) I then I get all of the user records. Is the stream() method looping through all of the app ......
Read more >How to iterate through all the data through okta api with limited ...
Anyways how can I iterate through all the groups. I am using the Okta python SDK. Here is my code: import okta from...
Read more >Spring Boot Reference Documentation
REST Clients: Calling REST Services with RestTemplate and WebClient ... If you accidentally run a web application twice, you see a “Port already...
Read more >WidgetField-TextWithIcon – Asana
Helpful code snippets will show up in this column. curl https://app.asana.com/api/1.0/users/me \ -H "Authorization ...
Read more >SailPoint Direct Connectors Administration and Configuration ...
New Connector: SharePoint Online, Okta, SuccessFactors and PeopleSoft ... application is responsible for calling Web APIs on behalf of the connector.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
e.g. GET /api/v1/users?search=profile.anetUserProfileId+eq+12345678
Fixed: https://github.com/okta/okta-sdk-java/pull/287