---
title: "Verify a member can leave one organization without losing other access"
description: "Leave a test organization as a non-owner member and verify its private resources disappear while the account and unrelated memberships remain valid."
canonical_url: "https://vostride.com/agent-library/organization-membership/self-leave-organization.md"
md_url: "https://vostride.com/agent-library/organization-membership/self-leave-organization.md"
content_kind: "recipe"
topic: "organization-membership"
---

# Verify a member can leave one organization without losing other access

Leave a test organization as a non-owner member and verify its private resources disappear while the account and unrelated memberships remain valid.

## Risk

Leaving an organization is narrower than deleting an account. A broken implementation can retain private access, remove the wrong membership, or sign the user out without actually completing the requested departure.

## Fixtures

- A test-owned non-owner account with membership in two disposable organizations.
- A private record in each organization and a known owner who can inspect the departing organization member list.
- A membership inspection hook and documented handling of the active organization after leaving.

## Steps

1. Open the organization to leave and verify its name, member identity, and private fixture record.
2. Use the self-service leave control and verify the confirmation identifies the correct organization before confirming once.
3. Verify the application lands in the documented remaining-organization or account-selection state and removes the departed organization from the switcher.
4. Reopen the former private record URL and verify access is denied; open the other organization record and verify it remains accessible.
5. Inspect memberships and the owner member list to confirm only the intended membership was removed and the account still exists.

## Expected results

- The selected organization membership is removed durably.
- Private resources in the departed organization no longer accept fresh access.
- The account and unrelated organization membership remain intact.

## False-pass traps

- A redirect to another organization does not prove the old membership was removed.
- Using an owner account would trigger different last-owner or transfer rules and obscure the member departure contract.

## Cleanup

- Restore the fixture membership if the disposable organizations are reused between tests.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Organization membership QA recipes](/agent-library/organization-membership.md)
- [Software factory QA library](/agent-library.md)
