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

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the atlanai CLI; `atlanai --map json` prints its command map. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.

# Get a service account



## OpenAPI

````yaml /public-openapi.json get /registry/v1/service-accounts/{principal_id}
openapi: 3.1.0
info:
  title: Atlan public API
  version: current
  description: >-
    Public HTTP API reference for Registry, Skills, Agents, outputs, files, MCP
    servers and tools, and OTLP telemetry ingestion.
servers:
  - url: https://api.atlan.com
    description: Atlan API base URL
security:
  - bearer: []
tags:
  - name: Core
  - name: Skill
  - name: Agent
  - name: Files
  - name: Knowledge
  - name: MCP
  - name: Observability
  - name: Usage
paths:
  /registry/v1/service-accounts/{principal_id}:
    get:
      tags:
        - Core
      summary: Get a service account
      operationId: registry.getServiceAccount
      parameters:
        - name: principal_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/registry-ServiceAccountDto'
          description: HTTP 200 response.
        '401':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - alg_mismatch
                          - alg_not_allowed
                          - audience_mismatch
                          - invalid_api_key
                          - missing_identity
                          - missing_org
                          - missing_user
                          - signature_invalid
                          - token_expired
                          - token_malformed
                          - token_missing
                          - token_not_yet_valid
                          - token_rejected
                          - token_service_account_unbound
                          - unauthorized
                          - unknown_account
                          - unknown_key
                          - untrusted_issuer
          description: HTTP 401 response.
        '403':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - access_denied
                          - account_suspended
                          - forbidden
                          - platform_principal_refused
          description: HTTP 403 response.
        '404':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
          description: HTTP 404 response.
        '500':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - internal_error
          description: HTTP 500 response.
        '503':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - auth_unavailable
                          - service_overloaded
          description: HTTP 503 response.
        '504':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - request_timeout
          description: HTTP 504 response.
components:
  schemas:
    registry-ServiceAccountDto:
      type: object
      required:
        - id
        - principal_type
        - client_id
        - status
        - scopes
        - redirect_uris
        - credentials
        - created_at
      properties:
        client_id:
          type: string
        created_at:
          type: string
        created_by:
          type:
            - string
            - 'null'
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/registry-CredentialSummaryDto'
        display_name:
          type:
            - string
            - 'null'
        id:
          type: string
        principal_type:
          type: string
        redirect_uris:
          type: array
          items:
            type: string
        revoked_at:
          type:
            - string
            - 'null'
        scopes:
          type: array
          items:
            type: string
        status:
          type: string
        updated_at:
          type:
            - string
            - 'null'
    registry-ProblemDetails:
      type: object
      required:
        - title
        - status
        - detail
        - code
      properties:
        code:
          type: string
        detail:
          type: string
        status:
          type: integer
          format: int32
          minimum: 0
        title:
          type: string
        trace_id:
          type:
            - string
            - 'null'
    registry-CredentialSummaryDto:
      type: object
      required:
        - kind
      properties:
        expires_at:
          type:
            - string
            - 'null'
        kind:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.