Reputation: 585
Is there a way in OKTA APIs to get users based on a list of userIds? Using "search" feature we can search for users whose firstName or lastName or email starts with some value. However if the use-case is something like searching for users whose id is in a list of given ids.
something like a where clase in sql.
Select * from users where id in ('23iuy234r223r','234235sefsfe','23534wsfwersef');
This could be really useful for calling list users api. So that we do not need to call get API for each user. Because naturally calling get multiple times can cause "API call exceeded rate limit due to too many requests" errors.
If there is a way to do this within existing okta apis or search features, Kindly suggest.
Upvotes: 2
Views: 1501
Reputation: 11226
Using the filter query param, you can retrieve multiple users like so:
https://YOUR_ORG.okta.com/api/v1/users?filter=id eq "23iuy234r223r" or id eq "234235sefsfe" or id eq "23534wsfwersef"
Upvotes: 8