> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

> Invite and manage users in your organization

Manage who has access to your organization. Invite team members, assign roles, and organize users into groups.

## How to Invite a User

<Steps>
  <Step title="Open Invite Dialog">
    Go to **Access Management → Users** and click **Invite User**.
  </Step>

  <Step title="Enter Details">
    * **Email Address** (required): Where the invitation will be sent
    * **First/Last Name** (optional): Can be updated later
    * **Role** (optional): Initial role assignment. Defaults to "Viewer" if not selected.
  </Step>

  <Step title="Send Invitation">
    Click **Send Invitation**. The user receives an email with a join link.
  </Step>
</Steps>

<Warning>
  Invitation links expire after 7 days. You can resend up to 5 times.
</Warning>

## How to Manage Pending Invitations

Pending invitations appear below the user list. For each invitation you can:

* **Copy Link**: Share the invitation URL directly (useful if emails aren't arriving)
* **Resend**: Send a fresh email with a new 7-day expiration
* **Cancel**: Revoke the invitation

<Tip>
  If an invitation expired, click Resend to generate a new valid link.
</Tip>

## How to Assign Roles to a User

<Steps>
  <Step title="Open User Profile">
    Go to **Access Management → Users** and click on the user.
  </Step>

  <Step title="Go to Roles Tab">
    Click the **Roles** tab to see available roles.
  </Step>

  <Step title="Select Roles">
    Check the roles you want to assign. Users can have multiple roles.
  </Step>

  <Step title="Save">
    Click **Save Changes**. Permissions take effect immediately.
  </Step>
</Steps>

<Info>
  Users receive permissions from both direct role assignments and group memberships. Permissions are combined from all sources.
</Info>

## How to Add a User to Groups

<Steps>
  <Step title="Open User Profile">
    Go to **Access Management → Users** and click on the user.
  </Step>

  <Step title="Go to Groups Tab">
    Click the **Groups** tab to see available groups.
  </Step>

  <Step title="Select Groups">
    Check the groups you want the user to join.
  </Step>

  <Step title="Save">
    Click **Save Changes**. The user inherits all roles assigned to those groups.
  </Step>
</Steps>

<Tip>
  Groups are more efficient than individual role assignments. Assign roles to a group, then add users to it.
</Tip>

## How to Remove a User

<Steps>
  <Step title="Open User Profile">
    Go to **Access Management → Users** and click on the user.
  </Step>

  <Step title="Remove from Organization">
    Scroll to the **Danger Zone** section and click **Remove from tenant**.
  </Step>

  <Step title="Confirm">
    Confirm the removal. This action is immediate.
  </Step>
</Steps>

<Warning>
  Removing a user revokes all access and role assignments. Their ShiftLabs account remains (they may have access to other organizations). To re-add them, send a new invitation.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Invitation email not arriving">
    1. Check recipient's spam/junk folder
    2. Verify the email address is correct
    3. Use **Copy Link** to share directly
    4. Try **Resend** to send a fresh email
  </Accordion>

  <Accordion title="User doesn't have expected permissions">
    1. Check their directly assigned roles (Roles tab)
    2. Check roles inherited from groups (Groups tab)
    3. Verify the roles include the required permissions
  </Accordion>

  <Accordion title="Cannot invite a user">
    * The email may already be registered in your organization
    * You may not have permission to invite users
  </Accordion>

  <Accordion title="Invitation expired">
    Click **Resend** on the invitation to generate a new link with 7 more days of validity.
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Can I reactivate a removed user?">
    Yes. Invite them again with the same email. They'll need to accept the new invitation.
  </Accordion>

  <Accordion title="What's the difference between direct roles and group roles?">
    Direct roles are assigned specifically to the user. Group roles are inherited from groups the user belongs to. Both are combined to determine final permissions.
  </Accordion>

  <Accordion title="How many roles can a user have?">
    No limit. Permissions from all roles are combined.
  </Accordion>

  <Accordion title="What happens to a user's data when removed?">
    The user loses access immediately. Their account remains in ShiftLabs (they may belong to other organizations). Audit logs of their actions are preserved.
  </Accordion>
</AccordionGroup>
