---
title: "Get project-role mappings"
method: GET
path: "/api/admin/projects/roles/{roleId}/access"
tags: ["Projects"]
---

# Get project-role mappings

`GET /api/admin/projects/roles/{roleId}/access`

**Enterprise feature**

For the provided role, retrieves a list of projects that use this role. For each project it also contains information about how the role used in that project, such as how many users, groups, or service accounts that use the role.

## Path parameters

- `roleId` string, required

## Response `200`

projectRoleUsageSchema

- ProjectRoleUsageSchema — A collection of projects with counts of users and groups mapped to them with specified roles.
  - `projects` ProjectRoleSchema[] — A collection of projects with counts of users and groups mapped to them with specified roles.
    - `project` string, required — The id of the project user and group count are counted for.
    - `role` integer — Id of the role the user and group count are counted for.
    - `userCount` integer — Number of users mapped to this project.
    - `serviceAccountCount` integer — Number of service accounts mapped to this project.
    - `groupCount` integer — Number of groups mapped to this project.

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