# /api/v2/organizations/{orgId}/members fails to find (some) users, returns 404

**URL:** <https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869>\
**Category:** Get Help\
**Tags:** organizations-management-api, management-api\
**Created:** [December 12, 2023, 3:02am UTC](https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869 "2023-12-12T03:02:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.berezowski](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michal.berezowski/32/53211_2.png) [@michal.berezowski](https://community.auth0.com/u/michal.berezowski)\
**Post date:** [December 12, 2023, 3:02am UTC](https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869/1 "2023-12-12T03:02:28Z")

</div>

Hello,

When trying to add a batch of users to organization, sometimes I receive 404 “One or more of the users do not exist.”,“errorCode”:“inexistent\_user” back. Which is fair, this is a part of our big user import/migration process, some users might have been removed in the meantime, between the bulk import and trying to add them to organizations, later.  
What is the expected behavior, regarding other users in the batch? Are they going to be added to org successfully, or is the entire batch failed/rolled back? I couldn’t find the expected behavior in the documentation (suggestion: add to documentation, if not present indeed)  
Thank you in advance,  
Michal Berezowski

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [December 12, 2023, 1:15pm UTC](https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869/2 "2023-12-12T13:15:54Z")

</div>

Hi @michal.berezowski , welcome to Auth0!

> [@michal.berezowski](#):
>
> suggestion: add to documentation, if not present indeed)

Fair point!

> [@michal.berezowski](#):
>
> What is the expected behavior, regarding other users in the batch?

If the request fails with 404, none of the users that currently are not members of the specific org will be aded there. (the whole request fails)

Please let us know any questions!

---

<div class="post-metadata">

**Author:** ![michal.berezowski](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michal.berezowski/32/53211_2.png) [@michal.berezowski](https://community.auth0.com/u/michal.berezowski)\
**Post date:** [December 14, 2023, 11:37am UTC](https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869/3 "2023-12-14T11:37:21Z")

</div>

Thanks for your reply, Marcelina, that fully clarifies the current behaviour.

If I may add my $0.02 of feedback here - perhaps it would be better if the behaviour was the opposite (adding the existing users, skipping the deleted ones). Api consumers probably care more about successfully adding existing users, than to be informed about the deleted ones - if the later breaks the happy path (we certainly do, in our case 😉 )

At the minimum, return 404 with the list of missing users’ ids - so it is possible to filter them out & retry, without having to engage other apis (checking for existence of every user in the batch; a looped operation, at that).

(However I appreciate it might be only due to our specific migration flow and its scale, that it is less than optimal.)

Thank you again for clarifying,  
Best Regards,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 28, 2023, 11:37am UTC](https://community.auth0.com/t/api-v2-organizations-orgid-members-fails-to-find-some-users-returns-404/122869/4 "2023-12-28T11:37:26Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
