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

# Remove User from Group

> Syteca ACB REST API endpoint to remove a user from a Syteca user group — for IdP-driven membership cleanup, role-change automation, and offboarding workflows.

Removes a user from a Syteca user group. The user keeps their direct permissions (those granted to the user individually) but loses any permissions inherited from this group's membership.

<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

* **Role-change cleanup** — User moves to a different team; remove from old team's group as part of the role-change automation.
* **Offboarding** — Remove from all groups before [deleting the user](/docs/api/acb/endpoints/delete-user) — useful for staged offboarding where you want to revoke access immediately but retain the user for a grace period.
* **AD group sync** — Mirror AD group removal into Syteca user groups.

### Permission loss is immediate

Group-inherited permissions are revoked the moment removal succeeds. Any active session the user has continues until the user signs out — but any new permission check (opening a Client session, fetching a secret) will reflect the new (reduced) permission set.

### Errors

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

* **403 Forbidden** — caller lacks User Management permission.
* **404 Not Found** — user not in group, or group/user doesn't exist.

## Related

<CardGroup cols={2}>
  <Card title="Add to user group" icon="users" href="/docs/api/acb/endpoints/add-user-to-group">The complementary addition endpoint.</Card>
  <Card title="Delete user" icon="user-x" href="/docs/api/acb/endpoints/delete-user">Remove the user entirely.</Card>
  <Card title="Get user details" icon="user-search" href="/docs/api/acb/endpoints/get-user-details">Verify current group memberships.</Card>
  <Card title="Secret permissions" icon="lock-keyhole" href="/docs/api/acb/secret-permissions">How groups inherit PAM role permissions.</Card>
</CardGroup>


## OpenAPI

````yaml DELETE /api/user-management/user-groups/{groupId}/users/{userId}
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/{userId}:
    delete:
      tags:
        - UserManagement
      summary: Remove user from group
      description: Remove a user (internal or domain) from a user group
      parameters:
        - name: groupId
          in: path
          required: true
          description: ID of the user group
          schema:
            type: integer
            format: int32
        - name: userId
          in: path
          required: true
          description: ID of the user (internal or domain)
          schema:
            type: integer
            format: int32
      responses:
        '204':
          description: User removed from 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:
    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

````