---
title: "Get roles for currently logged in user"
method: GET
path: "/api/admin/user/roles"
tags: ["Users"]
---

# Get roles for currently logged in user

`GET /api/admin/user/roles`

Gets roles assigned to currently logged in user. Both explicitly and transitively through group memberships

## Query parameters

- `projectId` string

## Response `200`

rolesSchema

- RolesSchema — A list of roles
  - `version` integer, required — The version of the role schema used
  - `roles` RoleSchema[], required — A list of roles
    - `id` integer, required — The role id
    - `type` string, required — A role can either be a global root role (applies to all projects) or a project role
    - `name` string, required — The name of the role
    - `description` string — A more detailed description of the role and what use it's intended for
    - `project` string, nullable — What project the role belongs to

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