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

# Get a SaaS by ID

> Return the SaaS details for the given company SaaS application ID.

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /saas/{saasId}
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /saas/{saasId}:
    get:
      tags:
        - Saas
      summary: Get a SaaS by ID
      description: Return the SaaS details for the given company SaaS application ID.
      operationId: getSaasById
      parameters:
        - name: saasId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSaasById_Output'
components:
  schemas:
    GetSaasById_Output:
      type: object
      properties:
        id:
          description: >-
            The company SaaS application ID (companySaasApplicationId). Pass
            this value as `saasId` to the other SaaS endpoints (getSaasById,
            getSaasIssues, provision/deprovision, …).
          type: string
        name:
          type: string
        approvalStatus:
          description: Approval status of the SaaS application in your company.
          type: string
          enum:
            - TO_REVIEW
            - APPROVED
            - REJECTED
        tags:
          type: array
          items:
            type: string
        connectionStatus:
          type: string
          enum:
            - CONNECTED
            - DISCONNECTED
            - PENDING
            - NOT_CONNECTED
            - NOT_CONNECTABLE
        identitiesCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        identities:
          type: array
          items:
            type: object
            properties:
              id:
                description: >-
                  The SaaS identity ID. Pass this value as `identityId` to
                  deprovisionSaasIdentity. This is NOT an employee ID.
                type: string
              employeeId:
                description: >-
                  ID of the Primo employee linked to this identity (same ID as
                  returned by the employee endpoints), or `null` when the
                  identity is not matched to an employee.
                anyOf:
                  - type: string
                  - type: 'null'
              email:
                type: string
              groups:
                description: IDs of groups assigned to this identity.
                type: array
                items:
                  type: string
              roles:
                description: IDs of roles assigned to this identity.
                type: array
                items:
                  type: string
              licenses:
                description: IDs of licenses assigned to this identity.
                type: array
                items:
                  type: string
              issues:
                description: >-
                  Provisioning issues currently flagged for this identity by the
                  configured SaaS rule.
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                      enum:
                        - NEED_ACCESS
                        - SHOULD_NOT_HAVE_ACCESS
                        - SHOULD_BE_MEMBER_OF_GROUP
                        - SHOULD_NOT_BE_MEMBER_OF_GROUP
                        - SHOULD_HAVE_ROLE
                        - SHOULD_NOT_HAVE_ROLE
                        - SHOULD_HAVE_LICENSE
                        - SHOULD_NOT_HAVE_LICENSE
                        - SHOULD_BE_IN_ORGANIZATION_UNIT
                        - ORPHANED_IDENTITY
                    groupId:
                      description: Group involved in the issue, when applicable.
                      anyOf:
                        - type: string
                        - type: 'null'
                    roleId:
                      description: Role involved in the issue, when applicable.
                      anyOf:
                        - type: string
                        - type: 'null'
                    licenseId:
                      description: License involved in the issue, when applicable.
                      anyOf:
                        - type: string
                        - type: 'null'
                    organizationUnitId:
                      description: >-
                        Organization unit involved in the issue, when
                        applicable.
                      anyOf:
                        - type: string
                        - type: 'null'
                    reason:
                      description: >-
                        Plain-language reason for this issue, displayed to the
                        end user.
                      anyOf:
                        - type: string
                        - type: 'null'
                    createdAt:
                      description: ISO 8601 date-time when the issue was created.
                      type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  required:
                    - id
                    - type
                    - groupId
                    - roleId
                    - licenseId
                    - organizationUnitId
                    - reason
                    - createdAt
                  additionalProperties: false
            required:
              - id
              - employeeId
              - email
              - groups
              - roles
              - licenses
              - issues
            additionalProperties: false
        recentEvents:
          type: array
          description: >-
            The 20 most synchronization-related recent events for this SaaS
            integration.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                description: Type of event that occurred on this SaaS integration.
                type: string
                enum:
                  - USER_PROVISIONED
                  - USER_UPDATED
                  - USER_GROUPS_REPLACED
                  - USER_ROLES_REPLACED
                  - USER_LICENSES_REPLACED
                  - USER_ORGANIZATION_UNITS_REPLACED
                  - USER_DEPROVISIONED
                  - SYNCED
                  - GROUPS_SYNCED
                  - ROLES_SYNCED
                  - LICENSES_SYNCED
                  - ORGANIZATION_UNITS_SYNCED
                  - API_CONNECTED
                  - API_DISCONNECTED
                  - AI_AGENT_CONFIGURED
                  - AI_AGENT_DISCONNECTED
                  - SSO_CONNECTED
                  - SSO_DISCONNECTED
                  - SSO_REQUESTED
                  - USER_ACTIVITIES_DISCOVERED
              status:
                description: Outcome status of the event.
                type: string
                enum:
                  - PENDING
                  - CANCELLED
                  - SUCCESS
                  - FAILED
              createdAt:
                description: ISO 8601 date-time when the event was created.
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              employeeId:
                description: Employee involved in the event, if applicable.
                anyOf:
                  - type: string
                  - type: 'null'
              contextType:
                description: Context in which the event occurred.
                anyOf:
                  - type: string
                    enum:
                      - ONBOARDING
                      - OFFBOARDING
                      - SYNC
                      - USER_ACTIVITIES_DISCOVERY
                  - type: 'null'
              errorMessage:
                description: Error message if the event failed, null otherwise.
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - id
              - name
              - status
              - createdAt
              - employeeId
              - contextType
              - errorMessage
            additionalProperties: false
        contract:
          description: Billing contract currently configured for this SaaS.
          anyOf:
            - type: object
              properties:
                pricingMode:
                  description: >-
                    Contract pricing mode. Use `flat_rate` for one recurring
                    amount or `per_licence` for license-based pricing.
                  anyOf:
                    - type: string
                      enum:
                        - per_licence
                        - flat_rate
                    - type: 'null'
                currency:
                  description: ISO currency code used for all contract prices.
                  anyOf:
                    - type: string
                      enum:
                        - EUR
                        - GBP
                        - USD
                        - CHF
                        - CAD
                    - type: 'null'
                billingFrequency:
                  description: >-
                    Billing period used by every price in this contract:
                    monthly, quarterly, or annual.
                  anyOf:
                    - type: string
                      enum:
                        - monthly
                        - quarterly
                        - annual
                    - type: 'null'
                flatRatePrice:
                  description: >-
                    Recurring flat-rate amount billed for one billing period
                    defined by `billingFrequency`. Not annualized. Required when
                    `pricingMode` is `flat_rate`; must be `null` when
                    `pricingMode` is `per_licence`.
                  anyOf:
                    - type: number
                    - type: 'null'
                unlicensedPricePerSeat:
                  description: >-
                    Price billed per unlicensed seat for one billing period
                    defined by `billingFrequency`. Not annualized. Required when
                    `pricingMode` is `per_licence`; must be `null` when
                    `pricingMode` is `flat_rate`.
                  anyOf:
                    - type: number
                    - type: 'null'
                unlicensedMinimumSeatsBilled:
                  description: >-
                    Minimum number of unlicensed seats billed during one billing
                    period. Required when `pricingMode` is `per_licence`; must
                    be `null` when `pricingMode` is `flat_rate`.
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    - type: 'null'
                licenses:
                  description: >-
                    Priced contract lines, one entry per SaaS license. Required
                    when `pricingMode` is `per_licence`; all `pricePerSeat` and
                    `minimumSeatsBilled` values must be `null` when
                    `pricingMode` is `flat_rate`. The list must exactly match
                    the licenses defined in the SaaS (same `id` for every
                    entry).
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        description: >-
                          License identifier used to map this priced contract
                          line to a SaaS license.
                        type: string
                      pricePerSeat:
                        description: >-
                          Price billed per seat for one billing period defined
                          by `billingFrequency`. Not annualized. Required when
                          `pricingMode` is `per_licence`; must be `null` when
                          `pricingMode` is `flat_rate`.
                        anyOf:
                          - type: number
                          - type: 'null'
                      minimumSeatsBilled:
                        description: >-
                          Minimum number of seats billed for this license during
                          one billing period. Required when `pricingMode` is
                          `per_licence`; must be `null` when `pricingMode` is
                          `flat_rate`.
                        anyOf:
                          - type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          - type: 'null'
                    required:
                      - id
                      - pricePerSeat
                      - minimumSeatsBilled
                    additionalProperties: false
              required:
                - pricingMode
                - currency
                - billingFrequency
                - flatRatePrice
                - unlicensedPricePerSeat
                - unlicensedMinimumSeatsBilled
                - licenses
              additionalProperties: false
            - type: 'null'
        finance:
          type: object
          description: Derived financial metrics computed from the configured contract.
          properties:
            yearlyCost:
              description: Total SaaS cost annualized from the contract billing frequency.
              anyOf:
                - type: number
                - type: 'null'
            unusedYearlyCost:
              description: >-
                Annualized cost of billed but unused seats derived from the
                current contract configuration.
              anyOf:
                - type: number
                - type: 'null'
            unusedSeatsCount:
              description: >-
                Number of billed seats currently unused based on the contract
                minimums and assigned identities.
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 9007199254740991
                - type: 'null'
          required:
            - yearlyCost
            - unusedYearlyCost
            - unusedSeatsCount
          additionalProperties: false
        licenses:
          type: array
          description: >-
            SaaS license catalog — all available licenses for this SaaS
            application.
          items:
            type: object
            properties:
              id:
                description: >-
                  License identifier used to map a SaaS license to a priced
                  contract line.
                type: string
              name:
                description: Human-readable license name.
                type: string
            required:
              - id
              - name
            additionalProperties: false
        groups:
          type: array
          description: >-
            All groups available in this SaaS application. Use `id` when
            provisioning.
          items:
            type: object
            properties:
              id:
                description: >-
                  Identifier of this group in the SaaS application. Use when
                  provisioning to assign the employee to the correct group.
                type: string
              name:
                description: Human-readable group name.
                type: string
            required:
              - id
              - name
            additionalProperties: false
        roles:
          type: array
          description: >-
            All roles available in this SaaS application. Use `id` when
            provisioning.
          items:
            type: object
            properties:
              id:
                description: >-
                  Identifier of this role in the SaaS application. Use when
                  provisioning to assign the correct role.
                type: string
              name:
                description: Human-readable role name.
                type: string
              description:
                description: Optional description of the role.
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - id
              - name
              - description
            additionalProperties: false
        organizationUnits:
          type: array
          description: >-
            All organization units available in this SaaS application. Use `id`
            when provisioning.
          items:
            type: object
            properties:
              id:
                description: >-
                  Identifier of this organization unit in the SaaS application.
                  Use when provisioning to assign the correct unit.
                type: string
              name:
                description: Human-readable organization unit name.
                type: string
            required:
              - id
              - name
            additionalProperties: false
        rule:
          description: >-
            Provisioning rule configured for this SaaS, or null if no rule has
            been authored yet.
          anyOf:
            - type: object
              properties:
                prompt:
                  description: >-
                    Natural-language policy prompt that drives provisioning
                    suggestions for this SaaS.
                  type: string
                status:
                  description: 'Lifecycle status of the rule: DRAFT, ENABLED, or DISABLED.'
                  type: string
                  enum:
                    - DRAFT
                    - ENABLED
                    - DISABLED
              required:
                - prompt
                - status
              additionalProperties: false
            - type: 'null'
      required:
        - id
        - name
        - approvalStatus
        - tags
        - connectionStatus
        - identitiesCount
        - identities
        - recentEvents
        - contract
        - finance
        - licenses
        - groups
        - roles
        - organizationUnits
        - rule
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````