---
title: "Retrieve user model roles"
method: GET
path: "/v1/users/{userId}/model-roles"
tags: ["User model roles"]
---

# Retrieve user model roles

`GET /v1/users/{userId}/model-roles`

Retrieve the model role assignments for a user. This includes both direct role assignments and roles inherited from user group memberships.

## Path parameters

- `userId` string, uuid, required

## Query parameters

- `modelId` string, uuid
- `connectionId` string, uuid

## Response `200`

User model roles retrieved successfully.

- object
  - `membershipId` string, uuid — The ID of the user's membership in the organization.
  - `results` object[] — Array of all role assignments for the user, including direct assignments, roles inherited from user groups, and connection base roles.
    - `modelId` string, uuid — The ID of the model.
    - `connectionId` string, uuid — The ID of the connection.
    - `roleName` string — The role name for this assignment.
    - `baseRole` string — The base role for this assignment.
    - `priority` integer — The priority of this role assignment. Higher values take precedence.
    - `resolved` boolean — If `true`, this is the highest priority role for the model. This is the role that will be used when determining the user's effective permissions.
    - `from` object — Information about where this role assignment comes from.
      - `type` string — The type of role assignment: - `User Role` - Direct role assignment to the user - `Group Role` - Role inherited from a user group - `Connection Base Role` - Default role from the connection
      - `miniUuid` string — The short ID of the user group. Only present for `Group Role` type.
      - `name` string — The name of the user group. Only present for `Group Role` type.
      - `depth` integer — The depth of group nesting. Only present for `Group Role` type.

## Other responses

- `404` — User not found in organization.
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
