Skip to main content
GET
/
directory
/
users
/
{user}
Describe a User
curl --request GET \
  --url https://wks-a1b2c3d4.provisionr.io/api/v1/directory/users/{user} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "state": "staged",
  "manager_id": "<string>",
  "is_manager": true,
  "first_name": "<string>",
  "last_name": "<string>",
  "full_name": "<string>",
  "email": "<string>",
  "username": "<string>",
  "badge_id": "<string>",
  "employee_id": "<string>",
  "employee_alt_id": "<string>",
  "timestamp": {
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "provisioned_at": "2023-11-07T05:31:56Z",
    "deprovisioned_at": "2023-11-07T05:31:56Z"
  },
  "org": {},
  "metadata": {},
  "count": {
    "secondary_users": 123,
    "direct_report_users": 123,
    "directory_identities": 123,
    "policy_conditions": 123,
    "policy_users": 123,
    "policy_rulesets": 123,
    "manifest_rules": 123,
    "qualified_rules": 123,
    "staged_rules": 123,
    "workspace_logs_parent": 123,
    "workspace_logs_record": 123,
    "workspace_logs_related": 123,
    "workspace_logs_subject": 123,
    "directory_attributes": 123,
    "gitlab_groups": 123,
    "gitlab_projects": 123,
    "google_drive_docs": 123,
    "google_drive_files": 123,
    "google_drive_folders": 123,
    "google_drive_decks": 123,
    "google_drive_sheets": 123,
    "google_identity_groups": 123,
    "google_workspace_drives": 123,
    "google_workspace_groups": 123,
    "okta_groups": 123,
    "slack_public_channels": 123,
    "slack_private_channels": 123,
    "slack_groups": 123
  },
  "included": {
    "manager_user": {
      "id": "<string>",
      "state": "staged",
      "manager_id": "<string>",
      "is_manager": true,
      "full_name": "<string>",
      "email": "<string>",
      "username": "<string>",
      "org": {},
      "metadata": {}
    },
    "workspace_user": {
      "id": "<string>",
      "state": "staged",
      "provider": "google",
      "provider_id": "<string>",
      "name": "<string>",
      "handle": "<string>",
      "email": "<string>"
    },
    "parent_user": {
      "id": "<string>",
      "state": "staged",
      "manager_id": "<string>",
      "is_manager": true,
      "full_name": "<string>",
      "email": "<string>",
      "username": "<string>",
      "org": {},
      "metadata": {}
    },
    "secondary_users": {
      "id": "<string>",
      "state": "staged",
      "manager_id": "<string>",
      "is_manager": true,
      "full_name": "<string>",
      "email": "<string>",
      "username": "<string>",
      "org": {},
      "metadata": {}
    },
    "direct_report_users": [
      {
        "id": "<string>",
        "state": "staged",
        "manager_id": "<string>",
        "is_manager": true,
        "full_name": "<string>",
        "email": "<string>",
        "username": "<string>",
        "org": {},
        "metadata": {}
      }
    ],
    "workspace_integration": {
      "id": "<string>",
      "is_primary": true,
      "vendor": "demo",
      "handle": "<string>",
      "domain": "<string>"
    },
    "directory_identities": [
      {
        "id": "<string>",
        "workspace_integration_id": "<string>",
        "directory_user_id": "<string>",
        "integration_vendor": "demo",
        "integration_handle": "<string>",
        "vendor_id": "<string>",
        "full_name": "<string>",
        "email": "<string>",
        "org": {},
        "state": "staged"
      }
    ],
    "policy_conditions": [
      {
        "id": "<string>",
        "is_imported": true,
        "type": "attribute",
        "ruleset_id": "<string>",
        "rule_id": "<string>",
        "resource_id": "<string>",
        "profile_key": "<string>",
        "profile_operator": "equals",
        "profile_value": "<string>",
        "description": "<string>"
      }
    ],
    "policy_users": [
      {
        "id": "<string>",
        "state": "staged",
        "timestamp": {
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "activated_at": "2023-11-07T05:31:56Z",
          "expires_at": "2023-11-07T05:31:56Z",
          "deleted_at": "2023-11-07T05:31:56Z"
        },
        "included": {
          "directory_user": {
            "id": "<string>",
            "state": "staged",
            "manager_id": "<string>",
            "is_manager": true,
            "full_name": "<string>",
            "email": "<string>",
            "username": "<string>",
            "org": {},
            "metadata": {}
          },
          "policy_ruleset": {
            "id": "<string>",
            "state": "unmanaged",
            "type": "directory_attribute",
            "resource_id": "<string>",
            "is_authoritative": true,
            "expires_after_days": 123
          },
          "policy_rule": {
            "id": "<string>",
            "state": "staged",
            "role_name": "<string>",
            "role_handle": "<string>",
            "is_imported": true,
            "description": "<string>",
            "expires_after_days": 123,
            "expires_after_days_inherited": true,
            "priority": 123
          }
        }
      }
    ],
    "policy_rules_manifest": [
      {
        "id": "<string>",
        "state": "staged",
        "role_name": "<string>",
        "role_handle": "<string>",
        "is_imported": true,
        "description": "<string>",
        "expires_after_days": 123,
        "expires_after_days_inherited": true,
        "priority": 123
      }
    ],
    "policy_rules_qualified": [
      {
        "id": "<string>",
        "state": "staged",
        "role_name": "<string>",
        "role_handle": "<string>",
        "is_imported": true,
        "description": "<string>",
        "expires_after_days": 123,
        "expires_after_days_inherited": true,
        "priority": 123
      }
    ],
    "policy_rules_staged": [
      {
        "id": "<string>",
        "state": "staged",
        "role_name": "<string>",
        "role_handle": "<string>",
        "is_imported": true,
        "description": "<string>",
        "expires_after_days": 123,
        "expires_after_days_inherited": true,
        "priority": 123
      }
    ],
    "policy_rulesets": [
      {
        "id": "<string>",
        "state": "unmanaged",
        "type": "directory_attribute",
        "resource_id": "<string>",
        "is_authoritative": true,
        "expires_after_days": 123
      }
    ]
  },
  "links": {
    "self": "<string>",
    "workspace_user": "<string>",
    "workspace_integration": "<string>",
    "secondary_users": "<string>",
    "direct_report_users": "<string>",
    "directory_identities": "<string>",
    "workspace_logs_parent": "<string>",
    "workspace_logs_record": "<string>",
    "workspace_logs_related": "<string>",
    "workspace_logs_subject": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.provisionr.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user
string
required

Directory User ID

Query Parameters

include
string

Available includes are secondary-users, secondary-users-count, secondary-users-exists, policy-conditions, policy-conditions-count, policy-conditions-exists, policy-users, policy-users-count, policy-users-exists, policy-rules-manifest, policy-rules-manifest-count, policy-rules-manifest-exists, policy-rules-qualified, policy-rules-qualified-count, policy-rules-qualified-exists, policy-rules-staged, policy-rules-staged-count, policy-rules-staged-exists, policy-rulesets, policy-rulesets-count, policy-rulesets-exists. You can include multiple options by separating them with a comma.

filter
string

Response

DirectoryUserDetailedResponseData

id
string
required
Example:

"drusr_01hq8xyzabc123def456ghi789"

state
enum<string>
required

The state of the directory user

staged
The record is staged and is only visible to administrators or in the API. Since Directory Users are managed by Directory Identities with your primary integration, this usually indicates that the user is staged and will be activated or onboarded soon. Staged users are not included in ruleset manifests until they are active users.
active
The record is active.
expiring
The expires_at value is set in the future for the record. You can run the activate action to remove the scheduled expiration.
expired
The expires_at value is in the past and the record was deactivated.
suspended
The record is temporarily suspended. This reflects the state of the primary Workspace Integration.
deactivated
The record was deactivated in the primary Workspace Integration.
Available options:
staged,
active,
expiring,
expired,
suspended,
deactivated
Example:

"active"

manager_id
string | null
required

The ID of the manager

Example:

"drusr_01kam9z5z71f7r4hhrm2ydxkhn"

is_manager
boolean
required

Whether or not the user is a people manager with direct reports

Example:

true

first_name
string
required

The first (given) name of the user

Example:

"Dade"

last_name
string
required

The last (family) name of the user

Example:

"Murphy"

full_name
string
required

The first and last name of the user

Example:

"Dade Murphy"

email
string
required

The email address of the user

Example:

"dmurphy@redshirt.systems"

username
string
required

The username of the user. Unless overridden, this is usually the email address handle

Example:

"dmurphy"

badge_id
string | null
required

The badge ID number of the user. This value is dynamically obtained from the primary integration based on the badge_id_profile_key

employee_id
string | null
required

The employee ID number of the user. This value is dynamically obtained from the primary integration based on the employee_id_profile_key

employee_alt_id
string | null
required

An alternative/secondary employee ID number of the user. This value is dynamically obtained from the primary integration based on the employee_alt_id_profile_key

timestamp
DirectoryUserTimestampResponseData · object
required

The timestamps for the directory user record

org
object
required

The user's organization metadata based on their dimension attributes

Example:
{
"cost_center": "CC-1234",
"department": "Infrastructure",
"division": "Engineering",
"title": "Senior Engineer"
}
metadata
object
required

The user's custom key/value metadata added by someone or automation in your organization

Example:
{
"custom_field_1": "value1",
"employee_type": "full-time",
"desk_number": "42"
}
count
DirectoryUserCountResponseData · object
required

Counts of related resources for the directory user

included
DirectoryUserIncludedResponseData · object
required

Related resources for the directory user. Use include parameter with a comma separated list of resources to fetch related data

API hyperlinks related to the directory user record