# Unable to get user after it is created

**URL:** <https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711>\
**Category:** Questions\
**Created:** [November 11, 2020, 11:55pm UTC](https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711 "2020-11-11T23:55:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neno](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@neno](https://devforum.okta.com/u/neno)\
**Post date:** [November 11, 2020, 11:55pm UTC](https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711/1 "2020-11-11T23:55:21Z")

</div>

Hi,  
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?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [November 18, 2020, 7:36pm UTC](https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711/2 "2020-11-18T19:36:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![neno](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@neno](https://devforum.okta.com/u/neno)\
**Post date:** [November 20, 2020, 6:56am UTC](https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711/3 "2020-11-20T06:56:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 25, 2024, 11:32pm UTC](https://devforum.okta.com/t/unable-to-get-user-after-it-is-created/11711/4 "2024-01-25T23:32:16Z")

</div>


