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

# Update Admin Permissions

> Syteca ACB REST API endpoint to update a user's administrative permissions — User Management, Privileged Accounts Management, Tenant Management, and other admin capabilities.

Updates a user's [administrative permissions](/docs/administration/users/administrative-permissions) — the global capabilities a user holds (e.g. User Management, Privileged Accounts Management, Tenant Management, System Configuration). This is **replacement** semantics: the supplied set of permissions becomes the user's full set.

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

### Replacement semantics — read before write

This endpoint **replaces** the user's administrative permissions with the supplied set. To add or remove individual permissions, first call [Get user details](/docs/api/acb/endpoints/get-user-details) to read the current set, then PUT the desired modified set.

<Warning>
  **Don't accidentally remove your own User Management permission.** If the Access Token's user is the one being modified, removing User Management permission ends API access mid-call. Syteca prevents removing User Management from the **last** holder, but you can lock yourself out of admin functions by removing it from yourself when others still hold it.
</Warning>

### Common use cases

* **Role promotion** — A user moves into an admin role; grant administrative permissions programmatically.
* **Periodic permission audit** — Quarterly automation reads, validates, and corrects each user's permissions against an external policy source of truth.
* **Compliance remediation** — Bulk-remove a permission from all users who shouldn't have it after a policy change.

### Errors

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

* **400 Bad Request** — invalid permission identifier.
* **403 Forbidden** — caller lacks User Management permission.
* **404 Not Found** — user doesn't exist.
* **409 Conflict** — attempting to remove User Management from the last holder.

## Related

<CardGroup cols={2}>
  <Card title="Get user details" icon="user-search" href="/docs/api/acb/endpoints/get-user-details">Read current permissions before updating.</Card>
  <Card title="Update client access" icon="laptop" href="/docs/api/acb/endpoints/update-client-access">Modify per-Client access rules.</Card>
  <Card title="Update user access" icon="users-round" href="/docs/api/acb/endpoints/update-user-access">Modify User-to-User access rules.</Card>
  <Card title="Administrative permissions" icon="key" href="/docs/administration/users/administrative-permissions">List of all admin permissions.</Card>
</CardGroup>


## OpenAPI

````yaml PUT /api/user-management/users/{userId}/admin-permissions
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/users/{userId}/admin-permissions:
    put:
      tags:
        - UserManagement
      summary: Update user Administrative permissions (internal/domain)
      description: Update Administrative permissions for a user
      parameters:
        - name: userId
          in: path
          required: true
          description: ID of the user to update Administrative permissions
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserAdminPermissionsRequestDto'
      responses:
        '204':
          description: Administrative permissions for a user updated 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:
    UpdateUserAdminPermissionsRequestDto:
      type: object
      properties:
        admin_permission_keys:
          type: array
          items:
            type: string
            description: Administrative permission identifier
          nullable: true
          description: >-
            List of administrative permission identifiers to assign directly to
            the user
      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

````