> ## 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 the SaaS identities no employee owns, across every application

> Return, as a paginated list, the SaaS identities of your company that are linked to no employee and classified as no other kind of account — the identities the cockpit shows as "To link" — across every SaaS application at once, whatever its approval status. Each item carries its `id`, `email`, the `saasId` / `saasName` / `approvalStatus` of the application it is on, and `syncedByIntegration`.

Use it to review or clean up the accounts nobody owns: pass the `id`s to `archiveSaasApplicationUsers` or `deleteSaasApplicationUsers`, up to 100 per call. Up to 100 identities per page; read `pagination.totalPages` and page through the rest.

Archiving or deleting an identity whose `syncedByIntegration` is true does not remove the account: the next sync of the integration brings it back. Leave those out and tell the user to remove the accounts in the application itself; Primo drops them at its next sync.

Prefer it over calling `getSaasById` once per application: that returns every identity of one application with its entitlements, so finding the unlinked ones that way takes one call per application.

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


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /saas-identities/unlinked
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-identities/unlinked:
    get:
      tags:
        - Saas
      summary: Get the SaaS identities no employee owns, across every application
      description: >-
        Return, as a paginated list, the SaaS identities of your company that
        are linked to no employee and classified as no other kind of account —
        the identities the cockpit shows as "To link" — across every SaaS
        application at once, whatever its approval status. Each item carries its
        `id`, `email`, the `saasId` / `saasName` / `approvalStatus` of the
        application it is on, and `syncedByIntegration`.


        Use it to review or clean up the accounts nobody owns: pass the `id`s to
        `archiveSaasApplicationUsers` or `deleteSaasApplicationUsers`, up to 100
        per call. Up to 100 identities per page; read `pagination.totalPages`
        and page through the rest.


        Archiving or deleting an identity whose `syncedByIntegration` is true
        does not remove the account: the next sync of the integration brings it
        back. Leave those out and tell the user to remove the accounts in the
        application itself; Primo drops them at its next sync.


        Prefer it over calling `getSaasById` once per application: that returns
        every identity of one application with its entitlements, so finding the
        unlinked ones that way takes one call per application.
      operationId: getUnlinkedSaasIdentities
      parameters:
        - name: syncedByIntegration
          required: false
          in: query
          description: >-
            Pass false to keep only the identities on applications no
            integration syncs, true to keep only the others.
          schema:
            type: boolean
        - name: approvalStatus
          required: false
          in: query
          description: >-
            Keep only the identities of SaaS applications in this approval
            status.
          schema:
            type: string
            enum:
              - TO_REVIEW
              - APPROVED
              - REJECTED
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            type: number
        - name: perPage
          required: false
          in: query
          description: Number of items per page (max 100)
          schema:
            type: number
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUnlinkedSaasIdentities_Output'
components:
  schemas:
    GetUnlinkedSaasIdentities_Output:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                description: >-
                  The SaaS identity ID, to pass to `archiveSaasApplicationUsers`
                  or `deleteSaasApplicationUsers`.
                type: string
              email:
                description: Email of the account on the SaaS application.
                type: string
              firstName:
                anyOf:
                  - type: string
                  - type: 'null'
              lastName:
                anyOf:
                  - type: string
                  - type: 'null'
              saasId:
                description: The company SaaS application the account is on, as `saasId`.
                type: string
              saasName:
                description: Display name of that application.
                type: string
              approvalStatus:
                description: Approval status of that application in your company.
                type: string
                enum:
                  - TO_REVIEW
                  - APPROVED
                  - REJECTED
              syncedByIntegration:
                description: >-
                  True when an integration syncs that application's accounts
                  into Primo. Archiving or deleting the identity then does not
                  remove the account: the next sync brings it back. The account
                  has to be removed in the application itself, and Primo drops
                  it at the next sync.
                type: boolean
            required:
              - id
              - email
              - firstName
              - lastName
              - saasId
              - saasName
              - approvalStatus
              - syncedByIntegration
            additionalProperties: false
        pagination:
          type: object
          properties:
            totalElements:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            perPage:
              type: integer
              minimum: 1
              maximum: 100
          required:
            - totalElements
            - totalPages
            - page
            - perPage
          additionalProperties: false
      required:
        - data
        - pagination
      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>`.

````