> ## 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 Groups for IDP Policy

> List all groups associated with a specific IDP policy.



## OpenAPI

````yaml get /idp/policies/{policy_id}/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/policies/{policy_id}/groups:
    get:
      tags:
        - idp
      summary: List Groups for IDP Policy
      description: List all groups associated with a specific IDP policy.
      operationId: list_idp_policy_groups
      parameters:
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
        - 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
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/OffsetPaginatedResponse_ScopedIDPGroupRespModel_
                  - $ref: >-
                      #/components/schemas/KeySetPaginatedResponse_ScopedIDPGroupRespModel_
                title: Response List Idp Policy 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_ScopedIDPGroupRespModel_:
      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:
            $ref: '#/components/schemas/ScopedIDPGroupRespModel'
          type: array
          title: Items
          description: List of items returned in the response
      type: object
      required:
        - count
        - items
      title: OffsetPaginatedResponse[ScopedIDPGroupRespModel]
    KeySetPaginatedResponse_ScopedIDPGroupRespModel_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ScopedIDPGroupRespModel'
          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[ScopedIDPGroupRespModel]
    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
  securitySchemes:
    Connection-ID:
      type: apiKey
      in: header
      name: X-CONNECTION-ID
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY

````