> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List IDP Users

> List all the IDP users for a given connection.



## OpenAPI

````yaml get /idp/users
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - description: Production API (US)
    url: https://api.leen.dev/v1
  - description: Production API (EU)
    url: https://api.eu-c1.leen.dev/v1
  - description: Production API (APAC)
    url: https://api.ap-se2.leen.dev/v1
security: []
paths:
  /idp/users:
    get:
      tags:
        - idp
      summary: List IDP Users
      description: List all the IDP users for a given connection.
      operationId: list_idp_users
      parameters:
        - description: >-
            Enable cursor based pagination instead of default offset-based
            pagination
          in: query
          name: enableCursor
          required: false
          schema:
            default: false
            description: >-
              Enable cursor based pagination instead of default offset-based
              pagination
            title: Enablecursor
            type: boolean
        - description: >-
            Only records whose `updated_at` is at or after this time. Leen bumps
            `updated_at` whenever any field on a record changes, so this is the
            filter for an incremental sync: it returns records that are new and
            records that changed, and nothing that has stood still. Example:
            `2021-01-01T00:00:00+00:00`.
          in: query
          name: updatedSince
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            description: >-
              Only records whose `updated_at` is at or after this time. Leen
              bumps `updated_at` whenever any field on a record changes, so this
              is the filter for an incremental sync: it returns records that are
              new and records that changed, and nothing that has stood still.
              Example: `2021-01-01T00:00:00+00:00`.
            examples:
              - '2021-01-01T00:00:00+00:00'
            title: Updatedsince
        - description: >-
            How many records to return per page. The walk is the same either
            way; a larger page means fewer round trips and more memory per
            response.
          in: query
          name: limit
          required: false
          schema:
            default: 100
            description: >-
              How many records to return per page. The walk is the same either
              way; a larger page means fewer round trips and more memory per
              response.
            maximum: 500
            minimum: 1
            title: Limit
            type: integer
        - description: >-
            Where to start, counted in records. Offset paging is stable only
            while the underlying data is; prefer the cursor for anything
            long-running.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: >-
              Where to start, counted in records. Offset paging is stable only
              while the underlying data is; prefer the cursor for anything
              long-running.
            minimum: 0
            title: Offset
            type: integer
        - description: >-
            Skip counting the total. Counting is the expensive half of a large
            query, so set this when you are walking every page anyway and never
            read `total`. `total` comes back null.
          in: query
          name: excludeTotal
          required: false
          schema:
            default: false
            description: >-
              Skip counting the total. Counting is the expensive half of a large
              query, so set this when you are walking every page anyway and
              never read `total`. `total` comes back null.
            title: Excludetotal
            type: boolean
        - description: >-
            Opaque position of the next page, taken from the previous response.
            Ignore its contents; it encodes where the walk had reached.
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque position of the next page, taken from the previous
              response. Ignore its contents; it encodes where the walk had
              reached.
            title: Cursor
        - description: Include IDP groups in the IDP user
          in: query
          name: includeIdpGroups
          required: false
          schema:
            default: false
            description: Include IDP groups in the IDP user
            title: Includeidpgroups
            type: boolean
        - description: Include IDP applications in the IDP user
          in: query
          name: includeIdpApplications
          required: false
          schema:
            default: false
            description: Include IDP applications in the IDP user
            title: Includeidpapplications
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/OffsetPaginatedResponse_Union_ScopedIDPUserRespModel__ScopedIDPUserWithEntitiesRespModel__
                  - $ref: >-
                      #/components/schemas/KeySetPaginatedResponse_Union_ScopedIDPUserRespModel__ScopedIDPUserWithEntitiesRespModel__
                title: Response List Idp Users
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorException'
          description: Internal Server Error
      security:
        - API-Key: []
          Connection-ID: []
components:
  schemas:
    OffsetPaginatedResponse_Union_ScopedIDPUserRespModel__ScopedIDPUserWithEntitiesRespModel__:
      properties:
        count:
          description: Number of items return in the response
          title: Count
          type: integer
        items:
          description: The records on this page.
          items:
            anyOf:
              - $ref: '#/components/schemas/ScopedIDPUserRespModel'
              - $ref: '#/components/schemas/ScopedIDPUserWithEntitiesRespModel'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total number of items that can be returned
          title: Total
      required:
        - count
        - items
      title: >-
        OffsetPaginatedResponse[Union[ScopedIDPUserRespModel,
        ScopedIDPUserWithEntitiesRespModel]]
      type: object
    KeySetPaginatedResponse_Union_ScopedIDPUserRespModel__ScopedIDPUserWithEntitiesRespModel__:
      properties:
        items:
          description: The records on this page.
          items:
            anyOf:
              - $ref: '#/components/schemas/ScopedIDPUserRespModel'
              - $ref: '#/components/schemas/ScopedIDPUserWithEntitiesRespModel'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque position of the next page. Pass it back as `cursor` to
            continue; null when this is the last page.
          title: Next Cursor
        previous_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque position of the previous page, for walking backwards. Null on
            the first page.
          title: Previous Cursor
      required:
        - items
      title: >-
        KeySetPaginatedResponse[Union[ScopedIDPUserRespModel,
        ScopedIDPUserWithEntitiesRespModel]]
      type: object
    ErrorResponse:
      properties:
        code:
          description: Error code
          title: Code
          type: string
        detail:
          description: List of error dictionaries
          items:
            additionalProperties: true
            type: object
          title: Detail
          type: array
        message:
          description: Error message
          title: Message
          type: string
        type:
          description: Type of error
          title: Type
          type: string
      required:
        - type
        - code
        - message
        - detail
      title: ErrorResponse
      type: object
    ErrorException:
      properties:
        detail:
          description: Error message
          title: Detail
          type: string
      required:
        - detail
      title: ErrorException
      type: object
    ScopedIDPUserRespModel:
      properties:
        activated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Activated at of the user
          title: Activated At
        address:
          anyOf:
            - $ref: '#/components/schemas/ScopedIDPUserAddressRespModel'
            - type: 'null'
          description: Address of the user in the source vendor
        department:
          anyOf:
            - type: string
            - type: 'null'
          description: Department of the user in the source vendor
          title: Department
        domain:
          description: Domain of the user
          title: Domain
          type: string
        email_addr:
          description: Email address of the user
          title: Email Addr
          type: string
        employee_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Employee ID of the user in the source vendor
          title: Employee Id
        full_name:
          description: Full name of the user
          title: Full Name
          type: string
        id:
          description: Leen's identifier for this user.
          format: uuid
          title: Id
          type: string
        is_admin:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the user is an admin
          title: Is Admin
        is_deleted:
          description: Is user deleted
          title: Is Deleted
          type: boolean
        is_mfa_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the user has MFA enabled
          title: Is Mfa Enabled
        job_title:
          anyOf:
            - type: string
            - type: 'null'
          description: Job title of the user in the source vendor
          title: Job Title
        last_login_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last login at of the user
          title: Last Login At
        last_password_changed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last password changed at of the user
          title: Last Password Changed At
        last_status_changed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last status changed at of the user
          title: Last Status Changed At
        last_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last updated at of the user
          title: Last Updated At
        manager:
          anyOf:
            - type: string
            - type: 'null'
          description: Manager of the user in the source vendor
          title: Manager
        name:
          description: Name of the user
          title: Name
          type: string
        vendor_created_at:
          description: Vendor's created at of the user
          format: date-time
          title: Vendor Created At
          type: string
        vendor_data:
          anyOf:
            - $ref: '#/components/schemas/MSEntraIDPUserVendorDataModel'
            - type: 'null'
          description: Vendor specific pass through data, values can vary based on vendor
        vendor_id:
          description: Vendor's ID of the user
          title: Vendor Id
          type: string
        vendor_status:
          description: Vendor's status of the user
          title: Vendor Status
          type: string
      required:
        - id
        - domain
        - email_addr
        - full_name
        - name
        - vendor_id
        - vendor_status
        - vendor_created_at
        - is_deleted
      title: ScopedIDPUserRespModel
      type: object
    ScopedIDPUserWithEntitiesRespModel:
      properties:
        activated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Activated at of the user
          title: Activated At
        address:
          anyOf:
            - $ref: '#/components/schemas/ScopedIDPUserAddressRespModel'
            - type: 'null'
          description: Address of the user in the source vendor
        applications:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ScopedIDPApplicationWithM2MUserDataRespModel
              type: array
            - type: 'null'
          description: Applications with M2M data of the user
          title: Applications
        department:
          anyOf:
            - type: string
            - type: 'null'
          description: Department of the user in the source vendor
          title: Department
        domain:
          description: Domain of the user
          title: Domain
          type: string
        email_addr:
          description: Email address of the user
          title: Email Addr
          type: string
        employee_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Employee ID of the user in the source vendor
          title: Employee Id
        full_name:
          description: Full name of the user
          title: Full Name
          type: string
        groups:
          anyOf:
            - items:
                $ref: '#/components/schemas/ScopedIDPGroupWithM2MUserDataRespModel'
              type: array
            - type: 'null'
          description: Groups with M2M data of the user
          title: Groups
        id:
          description: Leen's identifier for this user.
          format: uuid
          title: Id
          type: string
        is_admin:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the user is an admin
          title: Is Admin
        is_deleted:
          description: Is user deleted
          title: Is Deleted
          type: boolean
        is_mfa_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the user has MFA enabled
          title: Is Mfa Enabled
        job_title:
          anyOf:
            - type: string
            - type: 'null'
          description: Job title of the user in the source vendor
          title: Job Title
        last_login_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last login at of the user
          title: Last Login At
        last_password_changed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last password changed at of the user
          title: Last Password Changed At
        last_status_changed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last status changed at of the user
          title: Last Status Changed At
        last_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last updated at of the user
          title: Last Updated At
        manager:
          anyOf:
            - type: string
            - type: 'null'
          description: Manager of the user in the source vendor
          title: Manager
        name:
          description: Name of the user
          title: Name
          type: string
        vendor_created_at:
          description: Vendor's created at of the user
          format: date-time
          title: Vendor Created At
          type: string
        vendor_data:
          anyOf:
            - $ref: '#/components/schemas/MSEntraIDPUserVendorDataModel'
            - type: 'null'
          description: Vendor specific pass through data, values can vary based on vendor
        vendor_id:
          description: Vendor's ID of the user
          title: Vendor Id
          type: string
        vendor_status:
          description: Vendor's status of the user
          title: Vendor Status
          type: string
      required:
        - id
        - domain
        - email_addr
        - full_name
        - name
        - vendor_id
        - vendor_status
        - vendor_created_at
        - is_deleted
      title: ScopedIDPUserWithEntitiesRespModel
      type: object
    ScopedIDPUserAddressRespModel:
      properties:
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
      title: ScopedIDPUserAddressRespModel
      type: object
    MSEntraIDPUserVendorDataModel:
      properties:
        mail_nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Mail Nickname
        on_premises_distinguished_name:
          anyOf:
            - type: string
            - type: 'null'
          title: On Premises Distinguished Name
        password_policies:
          anyOf:
            - type: string
            - type: 'null'
          title: Password Policies
        vendor:
          const: MS_ENTRA
          default: MS_ENTRA
          title: Vendor
          type: string
      title: MSEntraIDPUserVendorDataModel
      type: object
    ScopedIDPApplicationWithM2MUserDataRespModel:
      properties:
        id:
          description: ID of the application
          format: uuid
          title: Id
          type: string
        is_deleted:
          description: Is application deleted
          title: Is Deleted
          type: boolean
        labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Labels of the application
          title: Labels
        last_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last updated at of the application
          title: Last Updated At
        name:
          description: Name of the application
          title: Name
          type: string
        user_app_last_login_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last login at of the user for this application
          title: User App Last Login At
        vendor_created_at:
          description: Vendor's created at of the application
          format: date-time
          title: Vendor Created At
          type: string
        vendor_id:
          description: Vendor's ID of the application
          title: Vendor Id
          type: string
        vendor_status:
          description: Vendor's status of the application
          title: Vendor Status
          type: string
        version:
          anyOf:
            - type: string
            - type: 'null'
          description: Version of the application
          title: Version
      required:
        - id
        - name
        - vendor_id
        - vendor_status
        - vendor_created_at
        - is_deleted
      title: ScopedIDPApplicationWithM2MUserDataRespModel
      type: object
    ScopedIDPGroupWithM2MUserDataRespModel:
      properties:
        description:
          description: Description of the group
          title: Description
          type: string
        id:
          description: ID of the group
          format: uuid
          title: Id
          type: string
        is_deleted:
          description: Is group deleted
          title: Is Deleted
          type: boolean
        last_membership_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last membership updated at of the group
          title: Last Membership Updated At
        last_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last updated at of the group
          title: Last Updated At
        name:
          description: Name of the group
          title: Name
          type: string
        types:
          description: Types of the group
          items:
            type: string
          title: Types
          type: array
        vendor_created_at:
          description: Vendor's created at of the group
          format: date-time
          title: Vendor Created At
          type: string
        vendor_id:
          description: Vendor's ID of the group
          title: Vendor Id
          type: string
      required:
        - id
        - types
        - description
        - name
        - vendor_id
        - vendor_created_at
        - is_deleted
      title: ScopedIDPGroupWithM2MUserDataRespModel
      type: object
  securitySchemes:
    API-Key:
      in: header
      name: X-API-KEY
      type: apiKey
    Connection-ID:
      in: header
      name: X-CONNECTION-ID
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.