Closed Saikishore031 closed 5 years ago
Looks like you left the data to filter by out.
This function is a little helper used to build a date based filter for users.
PS /> $users = oktaListUsersbyDate -field lastUpdated -operator gt -date '2019-03-01T00:00:00.000Z'
VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?filter=lastUpdated gt "2019-03-01T00:00:00.000Z"&limit=500 with 0-byte payload
VERBOSE: received -byte response of content type application/json
VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?after=00ujte1xftRTDlGEv0h7&limit=200&filter=lastUpdated+gt+"2019-03-01T00%3A00%3A00.000Z" with 0-byte payload VERBOSE: received -byte response of content type application/json VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?after=00ujtek52nA0zgZo20h7&limit=200&filter=lastUpdated+gt+"2019-03-01T00%3A00%3A00.000Z" with 0-byte payload VERBOSE: received -byte response of content type application/json VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?after=00ujteqgbwUv0urTm0h7&limit=200&filter=lastUpdated+gt+"2019-03-01T00%3A00%3A00.000Z" with 0-byte payload VERBOSE: received -byte response of content type application/json VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?after=00ujtey4mr5Jh4bBR0h7&limit=200&filter=lastUpdated+gt+"2019-03-01T00%3A00%3A00.000Z" with 0-byte payload VERBOSE: received -byte response of content type application/json VERBOSE: GET https://mattegantest.oktapreview.com/api/v1/users?after=00ujtf9fzsM65QosP0h7&limit=200&filter=lastUpdated+gt+"2019-03-01T00%3A00%3A00.000Z" with 0-byte payload VERBOSE: received -byte response of content type application/json PS /> $users.Count 1004 PS /> $user[1003] PS /> $users[1003]
id : 00ujzpe14i7besmWn0h7
status : STAGED
created : 3/28/19 2:48:21 PM
activated :
statusChanged :
lastLogin :
lastUpdated : 3/28/19 2:48:21 PM
passwordChanged :
profile : @{firstName=Fake; lastName=Matt; mobilePhone=; secondEmail=; login=mbegan@domain2.tld; email=mbegan@domain2.tld}
credentials : @{provider=}
_links : @{self=}
Facing an exception error,