Skip to main content
GET
/
tenant
/
{tenantId}
/
admin
/
users
GetTenantUsers
curl --request GET \
  --url https://api.example.com/tenant/{tenantId}/admin/users
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

This endpoint retrieves a collection of tenant users matching the specified filter criteria, including active status, user ID, and invitation acceptance status.

Input

  • tenantId (path, required): Identifier of the tenant whose users are being requested
  • usersViewRequest (query, optional): Filtering payload
    • onlyActive: Return only enabled users
    • userId: Filter by specific user ID
    • hasValidAcceptedInvitation: Filter by invitation acceptance status
  • cancellationToken (optional): Token to cancel the asynchronous operation

Output

Returns a Result<ICollection<TenantUserViewModel>> containing matching tenant users.

Examples

Request:
GET /api/tenant/1024/users?onlyActive=true
Response (200 OK):
{
  "data": [
    {
      "id": 256,
      "userId": 4242,
      "tenantId": 1024,
      "email": "[email protected]",
      "firstName": "Casey",
      "lastName": "Taylor",
      "isEnabled": true,
      "roles": []
    }
  ],
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid filter parameters
  • 401 Unauthorized: Authentication credentials are missing or invalid
  • 403 Forbidden: User lacks permission to view tenant users
  • 500 Internal Server Error: Unexpected server error occurred

Notes

  • Results may be filtered by multiple criteria simultaneously
  • Empty collection returned if no users match criteria

Path Parameters

TenantId
integer<int64>
required

Optional tenant identifier for cross-tenant lookups.

Example:

1024

Query Parameters

tenantId
integer<int64>

Identifier of the tenant whose users are being requested.

OnlyActive
boolean

True to return only active users, false to include all users.

Example:

true

UserId
integer<int64> | null

Optional user identifier to narrow the results to a specific user.

Example:

4242

HasValidAcceptedInvitation
boolean

True to return only users who have accepted their invitations.

Example:

false

Response

Tenant users retrieved successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object[] | null

The result value returned when the operation is successful.