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

# Get user

> Returns a `User` object.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /user
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs
  - name: users
    description: Operations related to users
paths:
  /user:
    get:
      tags:
        - users
      description: Returns a `User` object.
      operationId: user
      parameters:
        - description: The user ID of the user.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          explode: true
          in: query
          name: user_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
        - description: >-
            The email of the user. If both user ID and email are provided, user
            ID will take precedence. If neither are provided, an error will
            occur.
          example: johndoe@domain.org
          explode: true
          in: query
          name: email
          required: false
          schema:
            type: string
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: The user object associated with the passed-in email or ID.
      security:
        - BearerAuth: []
components:
  schemas:
    User:
      description: |-
        # User Object
        ### Description
        The `User` object is used to represent a user.

        ### Usage Example
        Fetch from the `LIST Sessions` endpoint.
      example:
        user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
        email: john.doe@company.dev
        full_name: John Doe
        first_name: John
        last_name: Doe
        position: Engineer
      properties:
        user_id:
          description: The ID of the user.
          example: h0z968412-2451-4bbd-42h4-057l715d917m
          format: uuid
          type: string
        email:
          description: The email of the user.
          example: john.doe@company.dev
          type: string
        full_name:
          description: The full name of the user.
          example: John Doe
          type: string
        first_name:
          description: The first name of the user.
          example: John
          type: string
        last_name:
          description: The last name of the user.
          example: Doe
          type: string
        position:
          description: The user's position.
          example: Senior Engineer
          type: string
        hr_idp_status:
          $ref: '#/components/schemas/UserHrIdpStatusEnum'
      required:
        - user_id
        - email
        - full_name
        - first_name
        - last_name
        - position
      type: object
    UserHrIdpStatusEnum:
      description: User status pulled from an HR/IDP provider.
      enum:
        - ACTIVE
        - SUSPENDED
        - DEPROVISIONED
        - DELETED
        - NOT_FOUND
      example: ACTIVE
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````