---
title: "Get user roles by username"
method: GET
path: "/api/v1/organizations/{organizationId}/users/{username}/roles"
tags: ["Accounts", "Organizations"]
---

# Get user roles by username

`GET /api/v1/organizations/{organizationId}/users/{username}/roles`

## Request

- Base URL: `https://backend.id4i.de`
- URL: `https://backend.id4i.de/api/v1/organizations/{organizationId}/users/{username}/roles`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/id4i/apis/id4i-api/docs/api/v1/organizations/:organizationId/users/:username/roles/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `organizationId` string, required
- `username` string, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

OK

- PaginatedResponseOfstring
  - `elements` string[], required
  - `limit` integer, required: The number of returned elements
  - `offset` integer, required: Starting with the n-th element
  - `total` integer: The total number of elements

## Other responses

- `202`: Accepted
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method not allowed
- `406`: Not Acceptable
- `415`: Unsupported Media Type
- `500`: Internal Server Error

---

[API](https://skmtc.dev/id4i/apis/id4i-api.md) - [All operations](https://skmtc.dev/id4i/apis/id4i-api/llms.txt) - [OpenAPI document](https://skmtc.dev/id4i/apis/id4i-api/revisions/b5f585ff1a29?raw)
