Skip to main content
POST
/
api
/
adm
/
users
/
details
Get User Details
curl --request POST \
  --url https://localhost:44371/api/adm/users/details \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Fetches complete details for a single user by their unique identifier. This endpoint returns comprehensive user information including profile fields, authentication status, associated companies, and optionally detailed permission and role assignments. This is commonly used for user detail pages, profile views, and administrative review.

Input

  • Body: model (UserGetDetailsRequest, required) — Request payload including:
    • id (guid, required) — Unique identifier of the user to retrieve.
    • includeCompanies (bool, optional) — Load associated company relationships.
    • includePermissions (bool, optional) — Load detailed role and permission assignments.

Output

Returns a UserGetDetailsResponse containing complete user details including optional related data.

Example Request

POST /api/admin/users/details
Content-Type: application/json
Authorization: Bearer {token}

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "includeCompanies": true,
  "includePermissions": false
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "email": "[email protected]",
    "firstName": "John",
    "lastName": "Smith",
    "phoneNumber": "555-0123",
    "isActive": true,
    "createdDate": "2025-01-15T10:30:00Z",
    "lastLoginDate": "2025-01-28T08:15:00Z",
    "companies": [
      {
        "companyId": "7b8c9d0e-1234-5678-9abc-def012345678",
        "companyName": "Acme Corporation",
        "role": "Administrator"
      }
    ]
  }
}

Errors

  • 400 Bad Request — Missing or invalid user ID.
  • 404 Not Found — No user exists with the specified ID.
  • 401 Unauthorized — Missing or invalid authentication token.
  • 403 Forbidden — User does not have permission to view user details.

Notes

  • Password hash and other sensitive authentication data are never returned.
  • Use includeCompanies flag to load associated company relationships.
  • Use includePermissions flag to load detailed role and permission assignments.
  • Response includes lastLoginDate for auditing and activity monitoring.
  • Inactive users are returned but marked with isActive=false.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The request payload containing the user ID and optional flags for including related data (companies, permissions).

Base structure for command requests that modify data. Defines the parameters required to retrieve detailed user information.

userId
string<guid> | null

The identifier of the user to look up.

email
string<email> | null

The email address used when searching for a user.

Maximum string length: 250

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Represents a response containing full user detail information.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entry
object

The detailed user information payload.