> ## 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 Cohort Users

> Search for users that belong to a suggestion's cohort, with optional additional profile filters.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/role-mining/suggestions/{suggestion_id}/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/role-mining/suggestions/{suggestion_id}/users:
    post:
      tags:
        - Role Mining
      summary: Search Cohort Users
      description: >-
        Search for users that belong to a suggestion's cohort, with optional
        additional profile filters.
      operationId: >-
        c1.api.role_mining_management.v1.RoleMiningManagementService.SearchCohortUsers
      parameters:
        - in: path
          name: suggestion_id
          required: true
          schema:
            description: The ID of the suggestion whose cohort to search within.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.role_mining_management.v1.SearchCohortUsersRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.role_mining_management.v1.SearchCohortUsersResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: SearchCohortUsers
          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\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\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.RoleMiningManagement.SearchCohortUsers(ctx, operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersRequest{\n        SuggestionID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.SearchCohortUsersResponse != 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.roleMiningManagement.searchCohortUsers({
                suggestionId: "<id>",
              });

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.role_mining_management.v1.SearchCohortUsersRequestInput:
      description: The SearchCohortUsersRequest message.
      properties:
        pageSize:
          description: Maximum number of users to return per page.
          format: int32
          type:
            - integer
            - 'null'
        pageToken:
          description: Pagination token from a previous response.
          type:
            - string
            - 'null'
        profileFilters:
          description: Additional profile filters to narrow the cohort user search.
          items:
            $ref: '#/components/schemas/c1.mcp.role_mining.v1.ProfileFilter'
          type:
            - array
            - 'null'
        selectedEntitlements:
          description: Optional list of entitlements to compute per-user coverage for.
          items:
            $ref: >-
              #/components/schemas/c1.api.role_mining_management.v1.EntitlementRef
          type:
            - array
            - 'null'
      title: Search Cohort Users Request
      type: object
      x-speakeasy-name-override: SearchCohortUsersRequest
    c1.api.role_mining_management.v1.SearchCohortUsersResponse:
      description: The SearchCohortUsersResponse message.
      properties:
        list:
          description: The list of users matching the cohort and optional filters.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.User'
          type:
            - array
            - 'null'
        nextPageToken:
          description: >-
            Token to retrieve the next page of results, empty if no more
            results.
          type:
            - string
            - 'null'
        usersWithCoverage:
          description: >-
            Per-user coverage counts, populated when selected_entitlements is
            non-empty.
          items:
            $ref: >-
              #/components/schemas/c1.api.role_mining_management.v1.CohortUserWithCoverage
          type:
            - array
            - 'null'
      title: Search Cohort Users Response
      type: object
      x-speakeasy-name-override: SearchCohortUsersResponse
    c1.mcp.role_mining.v1.ProfileFilter:
      description: |-
        ProfileFilter defines a filter on a user profile attribute.
         Use GetOrgOverview to discover available attribute keys and their values.
      properties:
        attribute:
          description: The attribute field.
          type:
            - string
            - 'null'
        values:
          description: The values field.
          items:
            type: string
          type:
            - array
            - 'null'
      title: Profile Filter
      type: object
      x-speakeasy-name-override: ProfileFilter
    c1.api.role_mining_management.v1.EntitlementRef:
      description: EntitlementRef identifies an entitlement by app and entitlement ID.
      properties:
        appId:
          description: The appId field.
          type:
            - string
            - 'null'
        entitlementId:
          description: The entitlementId field.
          type:
            - string
            - 'null'
      title: Entitlement Ref
      type: object
      x-speakeasy-name-override: EntitlementRef
    c1.api.user.v1.User:
      description: >-
        The User object provides all of the details for an user, as well as some
        configuration.
      properties:
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        delegatedUserId:
          description: >-
            The id of the user to whom tasks will be automatically reassigned
            to.
          type:
            - string
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        department:
          description: The department which the user belongs to in the organization.
          readOnly: true
          type:
            - string
            - 'null'
        departmentSources:
          description: >-
            A list of objects mapped based on department attribute mappings
            configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        directoryIds:
          description: A list of unique ids that represent different directories.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        directoryStatus:
          description: The status of the user in the directory.
          enum:
            - UNKNOWN
            - ENABLED
            - DISABLED
            - DELETED
          readOnly: true
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        directoryStatusSources:
          description: >-
            A list of objects mapped based on directoryStatus attribute mappings
            configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        displayName:
          description: The display name of the user.
          readOnly: true
          type:
            - string
            - 'null'
        email:
          description: This is the user's email.
          readOnly: true
          type:
            - string
            - 'null'
        emailSources:
          description: A list of source data for the email attribute.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        emails:
          description: This is a list of all of the user's emails from app users.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        employeeIdSources:
          description: A list of source data for the employee IDs attribute.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        employeeIds:
          description: This is a list of all of the user's employee IDs from app users.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        employmentStatus:
          description: The users employment status.
          readOnly: true
          type:
            - string
            - 'null'
        employmentStatusSources:
          description: >-
            A list of objects mapped based on employmentStatus attribute
            mappings configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        employmentType:
          description: The employment type of the user.
          readOnly: true
          type:
            - string
            - 'null'
        employmentTypeSources:
          description: >-
            A list of objects mapped based on employmentType attribute mappings
            configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        id:
          description: A unique identifier of the user.
          readOnly: true
          type:
            - string
            - 'null'
        jobTitle:
          description: The job title of the user.
          readOnly: true
          type:
            - string
            - 'null'
        jobTitleSources:
          description: >-
            A list of objects mapped based on jobTitle attribute mappings
            configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        managerIds:
          description: A list of ids of the user's managers.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        managerSources:
          description: >-
            A list of objects mapped based on managerId attribute mappings
            configured in the system.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        origin:
          description: The origin of the user, describing who owns the user's lifecycle.
          enum:
            - USER_ORIGIN_UNSPECIFIED
            - USER_ORIGIN_DIRECTORY
            - USER_ORIGIN_LOCAL
            - USER_ORIGIN_SYSTEM
          readOnly: true
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        profile:
          additionalProperties: true
          readOnly: true
          type:
            - object
            - 'null'
        roleIds:
          description: >-
            A list of unique identifiers that maps to ConductorOne's user roles
            let you assign users permissions tailored to the work they do in the
            software.
          items:
            type: string
          type:
            - array
            - 'null'
        status:
          description: The status of the user in the system.
          enum:
            - UNKNOWN
            - ENABLED
            - DISABLED
            - DELETED
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        type:
          description: The type of the user.
          enum:
            - USER_TYPE_UNSPECIFIED
            - USER_TYPE_SYSTEM
            - USER_TYPE_HUMAN
            - USER_TYPE_SERVICE
            - USER_TYPE_AGENT
          readOnly: true
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        username:
          description: >-
            This is the user's primary username. Typically sourced from the
            primary directory.
          readOnly: true
          type:
            - string
            - 'null'
        usernameSources:
          description: A list of source data for the usernames attribute.
          items:
            $ref: '#/components/schemas/c1.api.user.v1.UserAttributeMappingSource'
          readOnly: true
          type:
            - array
            - 'null'
        usernames:
          description: This is a list of all of the user's usernames from app users.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
      title: User
      type: object
      x-speakeasy-name-override: User
    c1.api.role_mining_management.v1.CohortUserWithCoverage:
      description: >-
        CohortUserWithCoverage pairs a user with the count of selected
        entitlements they hold.
      properties:
        coveredCount:
          description: Number of selected_entitlements that this user currently holds.
          format: int32
          type:
            - integer
            - 'null'
        user:
          oneOf:
            - $ref: '#/components/schemas/c1.api.user.v1.User'
            - type: 'null'
      title: Cohort User With Coverage
      type: object
      x-speakeasy-name-override: CohortUserWithCoverage
    c1.api.user.v1.UserAttributeMappingSource:
      description: The UserAttributeMappingSource message.
      properties:
        appId:
          description: The appId field.
          type:
            - string
            - 'null'
        appUserId:
          description: The appUserId field.
          type:
            - string
            - 'null'
        appUserProfileAttributeKey:
          description: The appUserProfileAttributeKey field.
          type:
            - string
            - 'null'
        userAttributeMappingId:
          description: The userAttributeMappingId field.
          type:
            - string
            - 'null'
        value:
          description: The value field.
          type:
            - string
            - 'null'
      title: User Attribute Mapping Source
      type: object
      x-speakeasy-name-override: UserAttributeMappingSource
  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

````