Tenant logs not showing details of some organization member removal

Problem Statement

We created an organization and added users to it. We noticed that after deleting some users from the tenant, the users got removed from the organization but the tenant logs did not show the user is removed from the organization.

Cause

Deleting a user at the tenant level causes the user to be removed from the Organization as well. However, no logs are triggered immediately for the Org removal which may lead to confusion.

This is due to the membership cleanup after user deletion being async and eventually consistent, which may generate that, on a rapid removal/creation of the same user, the previous memberships might be available for a while, but they’ll eventually disappear.

Solution

The best approach to avoid this behavior is to use non-repeating id’s on user removals/recreations.