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

# Add User to Group

> Syteca ACB REST API endpoint to add a user to a Syteca user group — for IdP-driven group membership sync, AD group mirroring, and team-based onboarding.

Adds a user to a Syteca user group. Group memberships drive access scoping — when a user joins a group, the user inherits the group's Client access, User-to-User access, and assigned roles on PAM secrets/folders.

<Note>
  For ACB deployments updated from a version prior to 1.2, switch to the `https://{hostname}/EkranACB` server in the Playground.
</Note>

### Permissions required

The Access Token must be issued to a user with the [administrative User Management permission](/docs/administration/users/administrative-permissions).

### Common use cases

* **AD group sync** — Mirror AD group memberships into Syteca user groups on a nightly schedule.
* **Onboarding workflow** — When a new user joins a team, automatically add them to the corresponding Syteca user group.
* **IdP-driven membership** — Okta / Azure AD group changes webhook to this endpoint for real-time sync.

### Permission inheritance is immediate

Permissions cascade through group membership — the moment a user is added, they have the group's permissions on all secrets, folders, and Clients the group has access to. No separate "apply" step.

### Errors

See [Status codes](/docs/api/acb/api-reference#status-codes). Common errors:

* **400 Bad Request** — invalid user or group identifier.
* **403 Forbidden** — caller lacks User Management permission.
* **404 Not Found** — user or group doesn't exist.
* **409 Conflict** — user is already a member of the group.

## Related

<CardGroup cols={2}>
  <Card title="Remove from group" icon="user-minus" href="/docs/api/acb/endpoints/remove-user-from-group">The complementary removal endpoint.</Card>
  <Card title="Get user details" icon="user-search" href="/docs/api/acb/endpoints/get-user-details">Verify current group memberships.</Card>
  <Card title="Update client access" icon="laptop" href="/docs/api/acb/endpoints/update-client-access">Set individual Client access if group inheritance isn't enough.</Card>
  <Card title="Secret permissions" icon="lock-keyhole" href="/docs/api/acb/secret-permissions">How groups inherit PAM role permissions.</Card>
</CardGroup>


## OpenAPI

````yaml POST /api/user-management/user-groups/{groupId}/users
openapi: 3.0.1
info:
  title: Application Credentials Broker API
  description: API for managing users in the Application Credentials Broker system
  version: 1.0.0
  contact:
    name: API Support
    email: support@example.com
servers:
  - url: https://your-syteca-host/SytecaACB
    description: On-premises Syteca ACB service (v1.2 or later)
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
  - url: https://your-syteca-host/EkranACB
    description: Legacy URL prefix for ACB deployments updated from pre-v1.2
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
security:
  - AccessTokenAuth: []
paths:
  /api/user-management/user-groups/{groupId}/users:
    post:
      tags:
        - UserManagement
      summary: Add user to group
      description: Add a user (internal or domain) to a user group
      parameters:
        - name: groupId
          in: path
          required: true
          description: ID of the target user group (internal Syteca user group)
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddUserToGroupRequestDto'
      responses:
        '204':
          description: User added to group successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AddUserToGroupRequestDto:
      type: object
      properties:
        user_id:
          type: integer
          format: int32
          description: >-
            ID of an internal or domain user that should become a member of the
            group
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
      required:
        - status
        - message
  securitySchemes:
    AccessTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Access token for authentication

````