Comments (10)
You would need to call client.getDataStore().getResource()
instead of client.listUsers
for this work around. Similar to #170 (comment), you could build your query this way.
from okta-sdk-java.
Not directly, but we do have automatic retry logic. Were you programmatically retrying after a failure?
Can you give me an example of how you were iterating over all of your users? How many users did you have?
I ask for two reasons, we could possibly suggest a different approach, and if we add this or similar feature.
All that said, you could use the DataStore client.getDatastore()
directly to make any request.
from okta-sdk-java.
The use case is we have a batch which validates data across our systems.If we find discrepancies with data we make necessary changes.
Sometimes this batch might be running and enter our maintenance windows.If we see too many network call failures on our end due to our maintenance window.
we save the getUserPagedResultsWithUrl into file.When our systems are back up we use the saved pagination url to restart the process so that we do not have to reprocess the whole data.
With this new SDK I do not know if this is possible.
from okta-sdk-java.
@SrihariGanadinni Great info!
You could still do this by using client.getDataStore().getResource("your-href", UserList.class)
You may also want to change your search filter to only return the results from the subset of users you are looking for.
Does this help?
from okta-sdk-java.
@SrihariGanadinni I'll close this issue, if that doesn't help, please reopen!
from okta-sdk-java.
I started to work on it ,seems like there is no difference ,unless I am missing something,can you provide me an example?
- UserList users = client.listUsers(null, "status eq "ACTIVE"", null, null, null);
- UserList users = client.getDataStore().getResource("Org url with filter",UserList.class)
Are you suggesting that I execute the first step and then pull the getnexturl from the userlist and then use the second step to getdatastore to get the userlistdata?
from okta-sdk-java.
Sort of,
You could keep track of an index as you loop through and set the after
query param if you are forced to retry.
https://developer.okta.com/docs/api/resources/users.html#request-parameters-2
from okta-sdk-java.
I am trying out the solution that was provided it keeps giving com.okta.sdk.resource.ResourceException: HTTP 400, Okta E0000031 (Invalid search criteria.),
Works:
DEFAULT_FILTER_CRITERIA = "status eq "ACTIVE"";
UserList users = client.listUsers(null, DEFAULT_FILTER_CRITERIA, null, null, null);
Erroring out:
DEFAULT_FILTER_CRITERIA = "status eq "ACTIVE"&limit=150";
UserList users = client.listUsers(null, DEFAULT_FILTER_CRITERIA, null, null, null);
But if I go to postman and execute the criteria like below it works,unless I am missing something.
Works on Postman:
?filter=status%20eq%20%22ACTIVE%22&limit=3&after={OktaaUserID}
from okta-sdk-java.
Okay,now I understand the filter has been simplified to restrict to what is documented in docs page and anything additional is via getdatastore. Probably documentation in examples would help! :)
from okta-sdk-java.
Agreed, this discussion is helpful to see some of the use cases that we should add some doc for
from okta-sdk-java.
Related Issues (20)
- Some characters are not serialized correctly. HOT 1
- ApiExceptionHelper throws an exception when ApiException doesnโt have a response body HOT 1
- An attempt to remove profile attribute value does not succeed HOT 2
- 13.0.2 missing UTF-8 support in Azure HOT 4
- Null LinksSelf in VerifyUserFactorResponse HOT 1
- Missing "List groups assigned to application" HOT 5
- OAUTH_AUTHORIZATION_POLICY PolicyType missing in latest spec HOT 9
- With 14.0.0 the application id is always null upon create HOT 2
- ClassNotFoundException with current dependencies in Gradle build HOT 4
- Okta Verify Fast Pass as an enrolled Factor is not returned HOT 8
- UserProfile equals() does not return true when objects are equal HOT 1
- Upgrade to 13.0.2 causes updateUser API to fail from attribute being mastered by a different system HOT 8
- `IdentityProviderApi` cannot properly deserialize `/ipds` responses HOT 1
- Create authorization server policy with type OAUTH_AUTHORIZATION_POLICY get error HOT 3
- IdP Discovery Policy not returned in listPolicyRules() HOT 2
- GroupsAPI - Custom group profile attributes missing HOT 3
- Several outdated dependencies
- OpenAPI spec missing some default role type HOT 3
- Invalid session HOT 3
- IdpPolicyRuleActionProvider needs the ability to set the provider id to be useful for creating IDP Routing Rules HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-sdk-java.