---
title: "Get users for a user attribute"
method: GET
path: "/v2/user-attributes/{userAttributeId}/users"
tags: ["User attributes"]
---

# Get users for a user attribute

`GET /v2/user-attributes/{userAttributeId}/users`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/user-attributes/{userAttributeId}/users`
- Auth: HTTP bearer

Get a list of users that have a specific user attribute defined, and the assigned value for the user attribute.

### Usage notes
- Retrieve the **userAttributeId** by calling the [/v2/user-attributes](https://help.sigmacomputing.com/reference/list-user-attributes) endpoint.
- Retrieve the **userId** by calling the [/v2/members](https://help.sigmacomputing.com/reference/list-members) endpoint and using the `memberId` included in the response.
- Use **userId** to return a single user's assignment. The response is empty if the attribute is not assigned to that user.
- Only values assigned **directly to a user** are returned. Default values and values a user inherits from a team are not included.

## Path parameters

- `userAttributeId` string, required

## Query parameters

- `page` string
- `limit` number, double
- `userId` string

## Response `200`

The response body.

- UserAttributesGetUserAttributeUserAssignmentsResponse200
  - `entries` V2UserAttributesUserAttributeIdUsersGetResponsesContentApplicationJsonSchemaEntriesItems[], required
    - `userId` string, required: Unique identifier of the user.
    - `value` V2UserAttributesUserAttributeIdUsersGetResponsesContentApplicationJsonSchemaEntriesItemsValue, required: Assigned value.
      - `type` 'string', required: Type of user attribute.
      - `val` string, required: Value of the user attribute.
    - `createdBy` string, required: The identifier of the user who created this object.
    - `updatedBy` string, required: The identifier of the user or process that last updated this object.
    - `createdAt` string, date-time, required: When the object was created.
    - `updatedAt` string, date-time, required: When the object was last updated.
  - `nextPage` string, nullable, required
  - `total` number, double

---

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