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
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.)