I added a new user to Okta, and the request finished successfully, but when I try to get this user (very shortly after, perhaps 100 ms) it cannot be found. After about 1.5 seconds this user can be retrieved just fine. Is this expected behavior?
What environment are you seeing this in: are you testing with a Preview tenant or a Production tenant? It sounds like you definitely don’t wait that long between API calls, so its possible they’re just not yet indexed for search and you may want to add a pause before you try to do a GET.
This is observed with the production tenant. Also, when the user profile is updated, it seems that the same thing happens, if I GET this user too soon, the stale date will be returned.
I’m afraid that adding a small delay to things is just a bandaid approach that will come back to bite us later under load.
Perhaps you could return an HTTP 409 Conflict or similar in these situations to indicate that the request is being processed?
Can we perhaps rely on
lastUpdated field in these stale data situations?