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

# Get the SSO connection

> Get the organization's SSO connection, if any, and the service-provider metadata to register with the identity provider.



## OpenAPI

````yaml /openapi.json get /sso/connection
openapi: 3.1.1
info:
  title: Sazabi Public API
  version: 1.0.0
  description: >
    Public REST API for Sazabi. Authenticate using a secret API key in the
    Authorization header.


    ## Pagination


    This API uses two pagination strategies depending on the endpoint type:


    ### Cursor-Based Pagination (List Endpoints)


    List endpoints (threads, messages, keys) use cursor-based pagination for
    efficient, consistent results:


    - **Parameters**: `limit` (items per page, default 50, max 100), `cursor`
    (opaque pagination token)

    - **Response**: Includes `nextCursor` field - pass this as `cursor` in the
    next request

    - **End of results**: When `nextCursor` is `null`, there are no more results

    - **Example**: `GET
    /v1/threads?limit=20&cursor=01234567-89ab-cdef-0123-456789abcdef`


    ### Page-Based Pagination (Search Endpoints)


    Search endpoints use page-based pagination due to the underlying search
    engine:


    - **Parameters**: `limit` (items per page, default 20, max 100), `page`
    (1-indexed page number)

    - **Response**: Includes `pagination` object with `page`, `limit`,
    `totalResults`, `totalPages`

    - **Example**: `GET /v1/search/threads?q=error&limit=10&page=2`
servers:
  - url: https://api.sazabi.com/v1
    description: Production
security: []
paths:
  /sso/connection:
    get:
      tags:
        - SSO
      summary: Get the SSO connection
      description: >-
        Get the organization's SSO connection, if any, and the service-provider
        metadata to register with the identity provider.
      operationId: sso.connections.get
      parameters:
        - name: organizationId
          in: query
          schema:
            type: string
            minLength: 1
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  connection:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          providerId:
                            type: string
                          protocol:
                            enum:
                              - saml
                              - oidc
                            type: string
                          issuer:
                            type: string
                          oidc:
                            anyOf:
                              - type: object
                                properties:
                                  clientId:
                                    type: string
                                  hasClientSecret:
                                    type: boolean
                                required:
                                  - clientId
                                  - hasClientSecret
                              - type: 'null'
                          saml:
                            anyOf:
                              - type: object
                                properties:
                                  ssoUrl:
                                    type: string
                                  certificates:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        fingerprint:
                                          type: string
                                        notAfter:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                      required:
                                        - fingerprint
                                        - notAfter
                                  metadataUrl:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                required:
                                  - ssoUrl
                                  - certificates
                                  - metadataUrl
                              - type: 'null'
                          defaultRole:
                            enum:
                              - member
                              - viewer
                            type: string
                          jitEnabled:
                            type: boolean
                          scimOnly:
                            type: boolean
                          maxSessionAgeSeconds:
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                exclusiveMinimum: 0
                              - type: 'null'
                          testedAt:
                            anyOf:
                              - type: string
                              - type: 'null'
                          disabledAt:
                            anyOf:
                              - type: string
                              - type: 'null'
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                          - id
                          - providerId
                          - protocol
                          - issuer
                          - oidc
                          - saml
                          - defaultRole
                          - jitEnabled
                          - scimOnly
                          - maxSessionAgeSeconds
                          - testedAt
                          - disabledAt
                          - createdAt
                          - updatedAt
                      - type: 'null'
                  serviceProvider:
                    type: object
                    properties:
                      entityId:
                        type: string
                      acsUrl:
                        type: string
                      metadataUrl:
                        type: string
                      oidcRedirectUrl:
                        type: string
                      initiateLoginUrl:
                        type: string
                      certificate:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - entityId
                      - acsUrl
                      - metadataUrl
                      - oidcRedirectUrl
                      - initiateLoginUrl
                      - certificate
                required:
                  - connection
                  - serviceProvider

````

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