> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-mcp-bridge-private-server.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Search app users based on filters specified in the request body.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/search/app_users
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/search/app_users:
    post:
      tags:
        - AppUsers
      summary: Search
      description: Search app users based on filters specified in the request body.
      operationId: c1.api.app.v1.AppUserService.Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/c1.api.app.v1.AppUserServiceSearchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.app.v1.AppUserServiceSearchResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: Search
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.AppUser.Search(ctx, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.AppUserServiceSearchResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.appUser.search();

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.app.v1.AppUserServiceSearchRequest:
      description: Search App users based on filters specified in the request body
      properties:
        appId:
          description: The app ID to restrict the search to.
          type:
            - string
            - 'null'
        appUserDomains:
          description: A list of account domains to restrict the search to.
          items:
            enum:
              - APP_USER_DOMAIN_UNSPECIFIED
              - APP_USER_DOMAIN_EXTERNAL
              - APP_USER_DOMAIN_TRUSTED
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
        appUserIds:
          description: A list of app user IDs to restrict the search to.
          items:
            type: string
          type:
            - array
            - 'null'
        appUserStatusDetails:
          description: A list of app user status details to restrict the search to.
          items:
            type: string
          type:
            - array
            - 'null'
        appUserStatuses:
          description: A list of app user statuses to restrict the search to.
          items:
            enum:
              - STATUS_UNSPECIFIED
              - STATUS_ENABLED
              - STATUS_DISABLED
              - STATUS_DELETED
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
        appUserTypes:
          description: A list of app user types to restrict the search to.
          items:
            enum:
              - APP_USER_TYPE_UNSPECIFIED
              - APP_USER_TYPE_USER
              - APP_USER_TYPE_SERVICE_ACCOUNT
              - APP_USER_TYPE_SYSTEM_ACCOUNT
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
        excludeAppUserIds:
          description: A list of app user IDs to remove from the results.
          items:
            type: string
          type:
            - array
            - 'null'
        expandMask:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppUserExpandMask'
            - type: 'null'
        pageSize:
          description: >-
            The pageSize where 0 <= pageSize <= 100. Values < 10 will be set to
            10. A value of 0 returns the default page size (currently 25)
          format: int32
          type:
            - integer
            - 'null'
        pageToken:
          description: The pageToken field.
          type:
            - string
            - 'null'
        query:
          description: Query the apps with a fuzzy search on display name and description.
          type:
            - string
            - 'null'
        refs:
          description: A list of app users to limit the search to.
          items:
            $ref: '#/components/schemas/c1.api.app.v1.AppUserRef'
          type:
            - array
            - 'null'
        userIds:
          description: A list of user IDs to restrict the search by.
          items:
            type: string
          type:
            - array
            - 'null'
      title: App User Service Search Request
      type: object
      x-speakeasy-name-override: AppUserServiceSearchRequest
    c1.api.app.v1.AppUserServiceSearchResponse:
      description: The AppUserServiceSearchResponse message.
      properties:
        expanded:
          description: List of related objects.
          items:
            additionalProperties: true
            description: >-
              Contains an arbitrary serialized message along with a @type that
              describes the type of the serialized message.
            properties:
              '@type':
                description: The type of the serialized message.
                type: string
            type: object
          type:
            - array
            - 'null'
        list:
          description: >-
            The list of results containing up to X results, where X is the page
            size defined in the request.
          items:
            $ref: '#/components/schemas/c1.api.app.v1.AppUserView'
          type:
            - array
            - 'null'
        nextPageToken:
          description: >-
            The nextPageToken is shown for the next page if the number of
            results is larger than the max page size.
             The server returns one page of results and the nextPageToken until all results are retrieved.
             To retrieve the next page, use the same request and append a pageToken field with the value of nextPageToken shown on the previous page.
          type:
            - string
            - 'null'
      title: App User Service Search Response
      type: object
      x-speakeasy-name-override: AppUserServiceSearchResponse
    c1.api.app.v1.AppUserExpandMask:
      description: >-
        The AppUserExpandMask message contains a list of paths to expand in the
        response.
      properties:
        paths:
          description: >-
            The paths to expand in the response. May be any combination of "*",
            "identity_user_id", "app_id", and "last_usage".
          items:
            type: string
          type:
            - array
            - 'null'
      title: App User Expand Mask
      type: object
      x-speakeasy-name-override: AppUserExpandMask
    c1.api.app.v1.AppUserRef:
      description: The AppUserRef message.
      properties:
        appId:
          description: The ID of the application.
          type:
            - string
            - 'null'
        id:
          description: The ID of the app user.
          type:
            - string
            - 'null'
      title: App User Ref
      type: object
      x-speakeasy-name-override: AppUserRef
    c1.api.app.v1.AppUserView:
      description: >-
        The AppUserView contains an app user as well as paths for apps, identity
        users, and last usage in expanded arrays.
      properties:
        appPath:
          description: >-
            JSONPATH expression indicating where the app is expanded in expanded
            arrays indicated in the request.
          type:
            - string
            - 'null'
        appUser:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppUser'
            - type: 'null'
        identityUserPath:
          description: >-
            JSONPATH expression indicating where the identity user is expanded
            in expanded arrays indicated in the request.
          type:
            - string
            - 'null'
        lastUsagePath:
          description: >-
            JSONPATH expression indicating where the last usage information is
            expanded in expanded arrays indicated in the request.
          type:
            - string
            - 'null'
      title: App User View
      type: object
      x-speakeasy-name-override: AppUserView
    c1.api.app.v1.AppUser:
      description: Application User that represents an account in the application.
      properties:
        appId:
          description: The ID of the application.
          readOnly: true
          type:
            - string
            - 'null'
        appUserType:
          description: The appplication user type. Type can be user, system or service.
          enum:
            - APP_USER_TYPE_UNSPECIFIED
            - APP_USER_TYPE_USER
            - APP_USER_TYPE_SERVICE_ACCOUNT
            - APP_USER_TYPE_SYSTEM_ACCOUNT
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        displayName:
          description: The display name of the application user.
          readOnly: true
          type:
            - string
            - 'null'
        email:
          description: The email field of the application user.
          readOnly: true
          type:
            - string
            - 'null'
        emails:
          description: The emails field of the application user.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        employeeIds:
          description: The employee IDs field of the application user.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        id:
          description: A unique idenditfier of the application user.
          readOnly: true
          type:
            - string
            - 'null'
        identityUserId:
          description: The conductor one user ID of the account owner.
          readOnly: true
          type:
            - string
            - 'null'
        isExternal:
          description: The isExternal field.
          readOnly: true
          type:
            - boolean
            - 'null'
        profile:
          additionalProperties: true
          readOnly: true
          type:
            - object
            - 'null'
        status:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppUserStatus'
            - type: 'null'
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        username:
          description: The username field of the application user.
          readOnly: true
          type:
            - string
            - 'null'
        usernames:
          description: The usernames field of the application user.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
      title: App User
      type: object
      x-speakeasy-name-override: AppUser
    c1.api.app.v1.AppUserStatus:
      description: The satus of the applicaiton user.
      properties:
        details:
          description: The details of applicaiton user status.
          readOnly: true
          type:
            - string
            - 'null'
        status:
          description: The application user status field.
          enum:
            - STATUS_UNSPECIFIED
            - STATUS_ENABLED
            - STATUS_DISABLED
            - STATUS_DELETED
          readOnly: true
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
      title: App User Status
      type: object
      x-speakeasy-name-override: AppUserStatus
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````