---
title: "Search user or group in the directory service."
method: POST
path: "/directory_services/{uuid}/search"
tags: ["directory_service"]
---

# Search user or group in the directory service.

`POST /directory_services/{uuid}/search`

Retrieves a user or a group available in the directory service based on
the UUID specified.

## Path parameters

- `uuid` string, UUID, required

## Request body

- DirectoryServiceSearchMetadata — The parameters to search for directory service.
  - `query` string, required — The search string.
  - `searched_attribute_list` string[] — The attributes for search operation. If not specified, search is performed with the common name.
  - `returned_attribute_list` string[] — The attributes the search operation returns. If not available, a list of default attributes is returned.

## Response `200`

Success

- DirectoryServiceSearchResponse — The response returned for directory service search operation.
  - `search_result_list` Entity[]
    - `type` string — User or group in the directory service.
    - `name` string — The name of the entity in canonical format.
    - `attribute_list` Attribute[]
      - `value_list` string[] — Value of the attribute.
      - `name` string — Name of the attribute.
  - `domain_name` string — The domain name of the directory service.
  - `api_version` string — The current API version.
  - `metadata` DirectoryServiceSearchMetadata — The parameters to search for directory service.
    - `query` string, required — The search string.
    - `searched_attribute_list` string[] — The attributes for search operation. If not specified, search is performed with the common name.
    - `returned_attribute_list` string[] — The attributes the search operation returns. If not available, a list of default attributes is returned.

## Other responses

- `default` — Internal Error

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/revisions/40395083ab31/schema)
