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

# SSO SAML Authentification

> The user should access this endpoint using a link on an intranet, a bookmark, or similar
and it will be automatically connected with the identity provider

1. When the user is redirected to this endpoint, we will redirect him to the identity provider
2. The identity provider will redirect the user to the /sso/callback endpoint with a SAML payload to authenticate the user
3. The service will generate tokens and send the user back to the frontend



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/entity-manager get /auth/sso/redirect/{domain}
openapi: 3.0.0
info:
  title: entity-manager
  version: unknown
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 400 |  |
servers:
  - url: https://api.reelevant.com/v2/
    description: production
security: []
paths:
  /auth/sso/redirect/{domain}:
    get:
      tags:
        - Authentification
      summary: SSO SAML Authentification
      description: >-
        The user should access this endpoint using a link on an intranet, a
        bookmark, or similar

        and it will be automatically connected with the identity provider


        1. When the user is redirected to this endpoint, we will redirect him to
        the identity provider

        2. The identity provider will redirect the user to the /sso/callback
        endpoint with a SAML payload to authenticate the user

        3. The service will generate tokens and send the user back to the
        frontend
      operationId: sso-redirect
      parameters:
        - name: domain
          in: path
          schema:
            type: string
          required: true
        - name: redirect_url
          in: query
          schema:
            type: string
          required: false
        - name: client_id
          in: query
          schema:
            type: string
          required: false
        - name: state
          in: query
          schema:
            type: string
          required: false
        - name: response_type
          in: query
          schema:
            type: string
          required: false
        - name: code_challenge
          in: query
          schema:
            type: string
          required: false
        - name: code_challenge_method
          in: query
          schema:
            type: string
          required: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: '#/components/schemas/InternalResponse_'
        '404':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/InternalResponse_'
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - fail
                      error_code:
                        type: number
                      code:
                        type: number
                      message:
                        type: string
                      data:
                        oneOf:
                          - type: object
                            properties: {}
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              count:
                                type: number
                            required:
                              - count
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              resources:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    resources:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                        required:
                                          - id
                                        additionalProperties: false
                                  required:
                                    - name
                                    - resources
                                  additionalProperties: false
                            required:
                              - resources
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties: {}
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              usedAt:
                                type: string
                                format: date-time
                            required:
                              - usedAt
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              reason:
                                type: string
                            required:
                              - reason
                            additionalProperties: false
                          - type: object
                            properties:
                              domains:
                                type: array
                                items:
                                  type: string
                            required:
                              - domains
                            additionalProperties: false
                          - type: object
                            properties:
                              domain:
                                type: string
                            required:
                              - domain
                            additionalProperties: false
                          - type: object
                            properties:
                              reason:
                                oneOf:
                                  - type: string
                                    enum:
                                      - incomplete
                                  - type: string
                                    enum:
                                      - never-used
                            required:
                              - reason
                            additionalProperties: false
                          - type: object
                            properties:
                              properties:
                                type: array
                                items:
                                  type: string
                            required:
                              - properties
                            additionalProperties: false
                    required:
                      - status
                      - error_code
                      - code
                      - message
                    additionalProperties: false
      security:
        - password_auth: []
components:
  schemas:
    InternalResponse_:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````