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

Description

This endpoint retrieves comprehensive details for a specific tenant user, including their profile information, enabled status, and assigned roles with permissions.

Input

  • tenantId (path, required): Identifier of the tenant that owns the user
  • id (path, required): Identifier of the tenant user to retrieve
  • cancellationToken (optional): Token to cancel the asynchronous operation

Output

Returns a Result<TenantUserViewModel> containing user details including assigned roles and permissions.

Examples

Request:
GET /api/tenant/1024/users/256
Response (200 OK):
{
  "data": {
    "id": 256,
    "userId": 4242,
    "tenantId": 1024,
    "principalOid": "d3b07384-d9a1-4655-a08e-df5f4f6d7d19",
    "firstName": "Casey",
    "lastName": "Taylor",
    "email": "[email protected]",
    "isEnabled": true,
    "roles": [
      {
        "id": 12,
        "name": "TenantAdministrator",
        "description": "Grants full tenant administration capabilities.",
        "permissions": [{ "id": 101, "name": "ManageUsers" }]
      }
    ]
  },
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid tenant or user identifier format
  • 401 Unauthorized: Authentication credentials are missing or invalid
  • 403 Forbidden: User lacks permission to view tenant users
  • 404 Not Found: Tenant user does not exist
  • 500 Internal Server Error: Unexpected server error occurred during retrieval

Notes

  • Includes all assigned roles and their associated permissions
  • User must belong to the specified tenant

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant that owns the user.

id
integer<int64>
required

Identifier of the tenant user to retrieve.

Response

Tenant user 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

The result value returned when the operation is successful.

Example:
{
"id": 256,
"userId": 4242,
"tenantId": 1024,
"principalOid": "d3b07384-d9a1-4655-a08e-df5f4f6d7d19",
"firstName": "Casey",
"lastName": "Taylor",
"email": "[email protected]",
"isEnabled": true,
"roles": [
{
"id": 12,
"name": "TenantAdministrator",
"description": "Grants full tenant administration capabilities."
}
]
}