---
title: "Set users and groups to roles in the current project"
method: PUT
path: "/api/admin/projects/{projectId}/access"
tags: ["Projects"]
---

# Set users and groups to roles in the current project

`PUT /api/admin/projects/{projectId}/access`

**Enterprise feature**

Sets all groups, users and their roles for the given project, overriding any existing configuration.

## Path parameters

- `projectId` string, required

## Request body

- ProjectAccessConfigurationSchema — An object describing roles for a project and what users and groups are part of that role.
  - `roles` object[], required — A list of roles that are available within this project.
    - `id` integer — The id of the role.
    - `groups` integer[] — A list of group ids that will be assigned this role
    - `users` integer[] — A list of user ids that will be assigned this role

## Response `200`

This response has no body.

## Other responses

- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
