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

# getSsoRedirectLink

> The `getSsoRedirectLink` API exchanges an employee or businessUser email and their company for a link that will bypass traditional login.

### What it does:
- Allows a user to sign in on your system and gain access to the Rollfi UI for core payroll funcitonality
- Bypasses username, password and 2FA which are usually required for logins

### Security:
- Generates a link to the Rollfi UI with a jwt containing the employee/businessUser's information
- Signs the JWT with a securely held private key and sha256 to prevent tampering
- When directed to the link with the included jwt, the credentials and signature are verified and login is bypassed

### Note:
- At this time roles are only necessary for just in time provisioning - **w2Employee** and **contractor1099**
- If you believe you may require JIT provisioning please contact support




## OpenAPI

````yaml post /sso/getSsoRedirectLink
openapi: 3.1.0
info:
  title: Default module
  description: |
    Webhook events emitted when a company's KYB status is created or changes.

    Rollfi sends these requests to the webhook URL configured for the client.
    Consumers should return a successful 2xx response after accepting the event.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Admin Portal
  - name: Pay Schedule Webhooks
  - name: Pay Period Webhooks
  - name: Employee Bank Account Webhooks
  - name: Employee KYC Webhooks
  - name: Company Bank Account Webhooks
  - name: Company Webhooks
  - name: Employee Status Webhooks
paths:
  /sso/getSsoRedirectLink:
    post:
      tags: []
      summary: getSsoRedirectLink
      description: >
        The `getSsoRedirectLink` API exchanges an employee or businessUser email
        and their company for a link that will bypass traditional login.


        ### What it does:

        - Allows a user to sign in on your system and gain access to the Rollfi
        UI for core payroll funcitonality

        - Bypasses username, password and 2FA which are usually required for
        logins


        ### Security:

        - Generates a link to the Rollfi UI with a jwt containing the
        employee/businessUser's information

        - Signs the JWT with a securely held private key and sha256 to prevent
        tampering

        - When directed to the link with the included jwt, the credentials and
        signature are verified and login is bypassed


        ### Note:

        - At this time roles are only necessary for just in time provisioning -
        **w2Employee** and **contractor1099**

        - If you believe you may require JIT provisioning please contact support
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                email:
                  type: string
                companyId:
                  type: string
                roles:
                  type: array
                  items:
                    type: string
                    enum:
                      - w2Employee
                      - contractor1099
                      - businessUser
                      - beneficialOwner
                      - payrollAdmin
                      - bookKeeper
              required:
                - method
                - email
                - companyId
            example:
              method: getSsoRedirectLink
              email: test_no_info4@emailsac.com
              companyId: 82CCB239-764C-49BA-A3A8-00B9C37A59D4
              roles:
                - w2Employee
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              examples:
                '1':
                  summary: Success
                  value:
                    success: true
                    loginUrl: >-
                      https://app.sandbox.rollfi.xyz/?jwt=eyJhbGciOiJSUzI1NiJ9.eyJjb21wYW55SWQiOiI4MkNDQjIzOS03NjRDLTQ5QkEtQTNBOC0wMEI5QzM3QTU5RDQiLCJlbWFpbCI6InRlc3Rfbm9faW5mbzRAZW1haWxzYWMuY29tIiwiaWF0IjoxNzY5Nzk3NDQ3LCJleHAiOjE3Njk3OTgxMDcsIm5iZiI6MTc2OTc5NzQ0Nywicm9sZXMiOlsidzJFbXBsb3llZSJdfQ.i3YrGu63PZr6WM27dN8QW_zFG3_tTR9XMEZeq0TakvxhGWJNHx-P9eIs9Hv57oV2gWxGpL1wKBTpHZEmWxYFHq1sshNu4sD1x4pHstPSPBZls1BH1_5p5y3Smk7w0tPVe97piZV8SFH5XWVN5zU3sOazRqkLaxtiDlLy5GV1WAPNVhqia6kPOP3PNTBLg7cq6hJqW0hGqQBo_iNNKW6MHgmMNYTlEr4Ba3WdPcX-vfnBHqGDMEkvPYt8czyvdctOftgmJNUBJ8tTEJUTe0h86iRGj12PtB_8zW8wUG37RaZFtjUhCGz9dWeuxX5Uan2A0teOUpo-VObJkmsvzRxihA
                '2':
                  summary: Does Not Exist
                  value:
                    error:
                      code: 403
                      message: >-
                        Email does not exist for the company but JIT was not
                        requested. Please check if the user already has an
                        account before proceeding
                '3':
                  summary: Invalid Company
                  value:
                    error:
                      code: 400
                      message: Invalid CompanyId
                '4':
                  summary: Invalid Email
                  value:
                    error:
                      code: 400
                      message: email is required and must be valid
          headers: {}
      deprecated: false
      security: []

````