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

# Groups

> Use groups for fine-grained access control over agents and knowledge bases.

# Groups

Groups provide **fine-grained access control** in Neural Factory. By assigning users to groups and then restricting agents or knowledge bases to specific groups, administrators can control exactly who sees what.

## How groups work

1. **Create groups** that represent teams, departments, or project scopes (e.g., "Engineering", "HR", "Finance")
2. **Add users** to the appropriate groups
3. **Assign groups** to agents and knowledge bases to control visibility

When an agent or knowledge base is restricted to specific groups, only users who belong to at least one of those groups can access it. If no group restrictions are set, the resource is available to everyone in the organization.

## Creating and managing groups

Administrators manage groups from the **User Management** section:

1. Navigate to **User Management** in the sidebar
2. Switch to the **Groups** tab
3. Click **Create Group** to add a new group
4. Give the group a name and optional description
5. Add members by searching for users in your organization

## Enterprise: Azure AD group sync

In enterprise deployments, groups are **automatically synced from Azure Active Directory**. When a user signs in, their AD group memberships are mirrored in Neural Factory. This means:

* Groups don't need to be created manually — they're imported from AD
* User-group assignments stay in sync with your directory
* Changes in AD (adding/removing users from groups) are reflected on next sign-in

## Groups in access control

Groups are used in two places:

* **Agent access control** — Restrict which groups can see and chat with an agent. See [Agent Access Control](/user-guide/agents/agent-access-control).
* **Knowledge base access control** — Restrict which groups can have their queries search a knowledge base. See [KB Access Control](/user-guide/knowledge-bases/kb-access-control).
