> ## 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 Groups

> List all the IDP groups for a given connection.



## OpenAPI

````yaml get /idp/groups
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - url: https://api.leen.dev/v1
    description: Production API
  - url: https://api.eu-c1.leen.dev/v1
    description: Production API (EU Region)
  - url: https://api.ap-se2.leen.dev/v1
    description: Production Api (APAC Region)
security: []
paths:
  /idp/groups:
    get:
      tags:
        - idp
      summary: List IDP Groups
      description: List all the IDP groups for a given connection.
      operationId: list_idp_groups
      parameters:
        - name: enableCursor
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Enable cursor based pagination instead of default offset-based
              pagination
            default: false
            title: Enablecursor
          description: >-
            Enable cursor based pagination instead of default offset-based
            pagination
        - name: updatedSince
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Datetime filter, only return items updated since this datetime.
              Example format: `2021-01-01T00:00:00+00:00`
            title: Updatedsince
          description: >-
            Datetime filter, only return items updated since this datetime.
            Example format: `2021-01-01T00:00:00+00:00`
          example: '2021-01-01T00:00:00+00:00'
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Limit size (page size)
            default: 100
            title: Limit
          description: Limit size (page size)
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Offset index (starting index of page)
            default: 0
            title: Offset
          description: Offset index (starting index of page)
        - name: excludeTotal
          in: query
          required: false
          schema:
            type: boolean
            description: Skips returning the total rows, total is set to null when true
            default: false
            title: Excludetotal
          description: Skips returning the total rows, total is set to null when true
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Skip token to continue from the last item in the previous page
            title: Cursor
          description: Skip token to continue from the last item in the previous page
        - name: includeIdpUsers
          in: query
          required: false
          schema:
            type: boolean
            description: Include IDP users in the IDP group
            default: false
            title: Includeidpusers
          description: Include IDP users in the IDP group
        - name: includeIdpApplications
          in: query
          required: false
          schema:
            type: boolean
            description: Include IDP applications in the IDP group
            default: false
            title: Includeidpapplications
          description: Include IDP applications in the IDP group
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/OffsetPaginatedResponse_Union_ScopedIDPGroupRespModel__ScopedIDPGroupWithEntitiesRespModel__
                  - $ref: >-
                      #/components/schemas/KeySetPaginatedResponse_Union_ScopedIDPGroupRespModel__ScopedIDPGroupWithEntitiesRespModel__
                title: Response List Idp Groups
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorException'
          description: Internal Server Error
      security:
        - Connection-ID: []
          API-Key: []
components:
  schemas:
    OffsetPaginatedResponse_Union_ScopedIDPGroupRespModel__ScopedIDPGroupWithEntitiesRespModel__:
      properties:
        count:
          type: integer
          title: Count
          description: Number of items return in the response
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: Total number of items that can be returned
        items:
          items:
            anyOf:
              - $ref: '#/components/schemas/ScopedIDPGroupRespModel'
              - $ref: '#/components/schemas/ScopedIDPGroupWithEntitiesRespModel'
          type: array
          title: Items
          description: List of items returned in the response
      type: object
      required:
        - count
        - items
      title: >-
        OffsetPaginatedResponse[Union[ScopedIDPGroupRespModel,
        ScopedIDPGroupWithEntitiesRespModel]]
    KeySetPaginatedResponse_Union_ScopedIDPGroupRespModel__ScopedIDPGroupWithEntitiesRespModel__:
      properties:
        items:
          items:
            anyOf:
              - $ref: '#/components/schemas/ScopedIDPGroupRespModel'
              - $ref: '#/components/schemas/ScopedIDPGroupWithEntitiesRespModel'
          type: array
          title: Items
          description: List of items returned in the response
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Skip token to continue from the last item in the previous page
        previous_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Cursor
          description: Skip token to continue from the first item in the previous page
      type: object
      required:
        - items
      title: >-
        KeySetPaginatedResponse[Union[ScopedIDPGroupRespModel,
        ScopedIDPGroupWithEntitiesRespModel]]
    ErrorResponse:
      properties:
        type:
          type: string
          title: Type
          description: Type of error
        code:
          type: string
          title: Code
          description: Error code
        message:
          type: string
          title: Message
          description: Error message
        detail:
          items:
            type: object
          type: array
          title: Detail
          description: List of error dictionaries
      type: object
      required:
        - type
        - code
        - message
        - detail
      title: ErrorResponse
    ErrorException:
      properties:
        detail:
          type: string
          title: Detail
          description: Error message
      type: object
      required:
        - detail
      title: ErrorException
    ScopedIDPGroupRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ID of the group
        types:
          items:
            type: string
          type: array
          title: Types
          description: Types of the group
        description:
          type: string
          title: Description
          description: Description of the group
        name:
          type: string
          title: Name
          description: Name of the group
        vendor_id:
          type: string
          title: Vendor Id
          description: Vendor's ID of the group
        vendor_created_at:
          type: string
          format: date-time
          title: Vendor Created At
          description: Vendor's created at of the group
        last_membership_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Membership Updated At
          description: Last membership updated at of the group
        last_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated At
          description: Last updated at of the group
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Is group deleted
      type: object
      required:
        - id
        - types
        - description
        - name
        - vendor_id
        - vendor_created_at
        - is_deleted
      title: ScopedIDPGroupRespModel
    ScopedIDPGroupWithEntitiesRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ID of the group
        types:
          items:
            type: string
          type: array
          title: Types
          description: Types of the group
        description:
          type: string
          title: Description
          description: Description of the group
        name:
          type: string
          title: Name
          description: Name of the group
        vendor_id:
          type: string
          title: Vendor Id
          description: Vendor's ID of the group
        vendor_created_at:
          type: string
          format: date-time
          title: Vendor Created At
          description: Vendor's created at of the group
        last_membership_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Membership Updated At
          description: Last membership updated at of the group
        last_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated At
          description: Last updated at of the group
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Is group deleted
        users:
          anyOf:
            - items:
                $ref: '#/components/schemas/ScopedIDPUserWithM2MGroupDataRespModel'
              type: array
            - type: 'null'
          title: Users
          description: Users with M2M data of the group
        applications:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ScopedIDPApplicationWithM2MGroupDataRespModel
              type: array
            - type: 'null'
          title: Applications
          description: Applications with M2M data of the group
      type: object
      required:
        - id
        - types
        - description
        - name
        - vendor_id
        - vendor_created_at
        - is_deleted
      title: ScopedIDPGroupWithEntitiesRespModel
    ScopedIDPUserWithM2MGroupDataRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        domain:
          type: string
          title: Domain
          description: Domain of the user
        email_addr:
          type: string
          title: Email Addr
          description: Email address of the user
        full_name:
          type: string
          title: Full Name
          description: Full name of the user
        name:
          type: string
          title: Name
          description: Name of the user
        vendor_id:
          type: string
          title: Vendor Id
          description: Vendor's ID of the user
        vendor_status:
          type: string
          title: Vendor Status
          description: Vendor's status of the user
        vendor_created_at:
          type: string
          format: date-time
          title: Vendor Created At
          description: Vendor's created at of the user
        activated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Activated At
          description: Activated at of the user
        last_status_changed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Status Changed At
          description: Last status changed at of the user
        last_login_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login At
          description: Last login at of the user
        last_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated At
          description: Last updated at of the user
        last_password_changed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Password Changed At
          description: Last password changed at of the user
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Is user deleted
        is_mfa_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Mfa Enabled
          description: Whether the user has MFA enabled
        is_admin:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Admin
          description: Whether the user is an admin
        employee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Id
          description: Employee ID of the user in the source vendor
        job_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Title
          description: Job title of the user in the source vendor
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
          description: Department of the user in the source vendor
        manager:
          anyOf:
            - type: string
            - type: 'null'
          title: Manager
          description: Manager of the user in the source vendor
        address:
          anyOf:
            - $ref: '#/components/schemas/ScopedIDPUserAddressRespModel'
            - type: 'null'
          description: Address of the user in the source vendor
        vendor_data:
          anyOf:
            - $ref: '#/components/schemas/MSEntraIDPUserVendorDataModel'
            - type: 'null'
          description: Vendor specific pass through data, values can vary based on vendor
      type: object
      required:
        - id
        - domain
        - email_addr
        - full_name
        - name
        - vendor_id
        - vendor_status
        - vendor_created_at
        - is_deleted
      title: ScopedIDPUserWithM2MGroupDataRespModel
    ScopedIDPApplicationWithM2MGroupDataRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ID of the application
        labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Labels
          description: Labels of the application
        name:
          type: string
          title: Name
          description: Name of the application
        vendor_id:
          type: string
          title: Vendor Id
          description: Vendor's ID of the application
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Version of the application
        vendor_status:
          type: string
          title: Vendor Status
          description: Vendor's status of the application
        vendor_created_at:
          type: string
          format: date-time
          title: Vendor Created At
          description: Vendor's created at of the application
        last_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated At
          description: Last updated at of the application
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Is application deleted
      type: object
      required:
        - id
        - name
        - vendor_id
        - vendor_status
        - vendor_created_at
        - is_deleted
      title: ScopedIDPApplicationWithM2MGroupDataRespModel
    ScopedIDPUserAddressRespModel:
      properties:
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
      type: object
      title: ScopedIDPUserAddressRespModel
    MSEntraIDPUserVendorDataModel:
      properties:
        vendor:
          type: string
          enum:
            - MS_ENTRA
          const: MS_ENTRA
          title: Vendor
          default: MS_ENTRA
        mail_nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Mail Nickname
        password_policies:
          anyOf:
            - type: string
            - type: 'null'
          title: Password Policies
        on_premises_distinguished_name:
          anyOf:
            - type: string
            - type: 'null'
          title: On Premises Distinguished Name
      type: object
      title: MSEntraIDPUserVendorDataModel
  securitySchemes:
    Connection-ID:
      type: apiKey
      in: header
      name: X-CONNECTION-ID
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY

````