Skip to content
  • Auto
  • Light
  • Dark
Get Started

Retrieve

Get
client.users.retrieve(stringid, RequestOptionsoptions?): expandedunionuserViewUserViewUserRetrieveResponse
get/api/v1/users/{id}

Get a user by ID.

Parameters
idstring

The id field.

Returns
UserRetrieveResponse

The UserServiceGetResponse returns a user view which has a user including JSONPATHs to the expanded items in the expanded array.

Hide ParametersShow Parameters
expandedunion
optional
Array<Expanded> | null

List of serialized related objects.

Hide ParametersShow Parameters
@typestring
optional

The type of the serialized message.

userViewdelegatedUserPathstringdirectoriesPathstringmanagersPathstringrolesPathstringuserC1APIUserV1UserUserView
optional

The UserView object provides a user response object, as well as JSONPATHs to related objects provided by expanders.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const user = await client.users.retrieve('id');

console.log(user.expanded);
200 Example
{
  "expanded": [
    {
      "@type": "@type"
    }
  ],
  "userView": {
    "user": {
      "delegatedUserId": "delegatedUserId",
      "roleIds": [
        "string"
      ],
      "status": "UNKNOWN"
    }
  }
}