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

# sso_authentication

> Initiates the OpenID Connect authentication process by redirecting to the authorization server.

This endpoint begins the standard OpenID Connect authentication process:

1. The client calls this endpoint with a callback path.
2. The server responds with a redirect to the identity provider.
3. The user authenticates with the identity provider.
4. The identity provider redirects back to the callback endpoint.
5. The client can exchange the authorization code for an access token.



## OpenAPI

````yaml /openapi/generated-api-methods.json POST /v1/sso_authentication
openapi: 3.1.0
info:
  title: Generated API methods
  version: 1.0.0
  description: Generated from imported ApiMethodV2 blocks.
servers:
  - url: https://{sql_node}
    variables:
      sql_node:
        default: sql_node
  - url: http://oc1-lts0:9090
security: []
paths:
  /v1/sso_authentication:
    post:
      tags:
        - Ocient HTTP Query API
      summary: sso_authentication
      description: >-
        Initiates the OpenID Connect authentication process by redirecting to
        the authorization server.


        This endpoint begins the standard OpenID Connect authentication process:


        1. The client calls this endpoint with a callback path.

        2. The server responds with a redirect to the identity provider.

        3. The user authenticates with the identity provider.

        4. The identity provider redirects back to the callback endpoint.

        5. The client can exchange the authorization code for an access token.
      operationId: postOcientHttpQueryApiSsoAuthentication
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                database:
                  type: string
                  description: >-
                    Target database name. If you do not specify this parameter,
                    the request defaults this value to system.
                "sso_callback_path\t":
                  type: string
                  description: >-
                    Local path for redirection after successful authentication.
                    This path should be registered with your OpenID provider as
                    a valid redirect URI.
                do_redirect:
                  type: boolean
                  description: >-
                    Determines whether to issue the redirect to the
                    authentication server immediately.


                    If you set this value to true (default), the API responds
                    with a 302 redirect to the OpenID provider.


                    If you set this value to false, the API returns the URL in
                    the response body, allowing the client to handle the
                    redirect manually.


                    If you have no SSO configuration for the database, an error
                    occurs if this parameter value is set to true. Otherwise,
                    the request returns an empty redirect.
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      reason:
                        type: string
                      sql_state:
                        type: string
                      vendor_code:
                        type: integer
              examples:
                response:
                  value:
                    status:
                      reason: Query executed successfully
                      sql_state: '00000'
                      vendor_code: 0
        '404':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              examples:
                response:
                  value:
                    message: Ain't no cake like that.
      servers:
        - url: https://{sql_node}
          variables:
            sql_node:
              default: sql_node
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST https://my_sql_node.com/v1/sso_authentication \
                -H "Content-Type: application/json" \
                -d '{
                    "database": "retail_analytics",
                    "sso_callback_path": "/auth/callback",
                    "do_redirect": true
                }'

````