---
title: "Verify a new member invitation grants the intended organization role"
description: "Invite a controlled email address, accept its run-specific message, and verify organization identity, assigned permissions, and a single durable membership."
canonical_url: "https://vostride.com/agent-library/organization-membership/invite-new-member-acceptance.md"
md_url: "https://vostride.com/agent-library/organization-membership/invite-new-member-acceptance.md"
content_kind: "recipe"
topic: "organization-membership"
---

# Verify a new member invitation grants the intended organization role

Invite a controlled email address, accept its run-specific message, and verify organization identity, assigned permissions, and a single durable membership.

## Risk

An invitation flow crosses email, account identity, and organization authorization. Acceptance may look successful while joining the wrong organization or granting a default role different from the role chosen by the inviter.

## Fixtures

- A test-owned organization administrator and a controlled recipient without existing membership.
- A dedicated test inbox and a role with a clear permitted action and a clear forbidden action.
- An invitation and membership inspection hook scoped to the fixture organization.

## Steps

1. As the administrator, invite the exact fixture address with the intended role and verify the pending invitation row shows both values.
2. Read the run-specific invitation from the test inbox and verify its organization name before opening the acceptance link.
3. Complete the supported sign-up or sign-in flow for the recipient and accept; verify the organization dashboard and recipient identity.
4. Perform the role permitted action and verify its result, then inspect the forbidden control or direct route and verify it remains blocked.
5. Run the membership hook and verify exactly one active membership exists with the intended role and the invitation is marked accepted.

## Expected results

- The recipient joins the organization named in the invitation.
- The active membership role matches the administrator selection.
- Acceptance transitions one pending invitation into one membership without duplicates.

## False-pass traps

- A welcome page can belong to a personal workspace rather than the invited organization.
- Checking only the role label misses permissions that still follow an unintended default role.

## Cleanup

- Remove the recipient membership and delete any run-owned resources created by the permitted action.

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