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

# Get user details

> This API allows a logged in user to get his own details from the fabric Identity. The API is designed to return the details of the user whose bearer token is sent in the header.



## OpenAPI

````yaml identity_v2 get /users/self
openapi: 3.0.0
info:
  description: >-
    User self service APIs are provided for `userapp`(s) developers to quickly
    build support for typical identity account operations like get/update login
    information, change password and forgot password flows.
  version: 2.0.0
  termsOfService: https://fabric.inc/terms-of-use
  title: User Self Service APIs
  contact:
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://api.identity.fabric.zone/ums/v2
    description: Production
security: []
tags:
  - name: User Self Service APIs
    description: >-
      These APIs allow `userapp`(s) to provide user self service for their
      identity accounts. These include basic user services like get/update login
      information, change password and forgot password flows.
externalDocs:
  description: Find out more about User Self Service APIs
  url: https://developer.fabric.inc/reference/user-self-service-apis
paths:
  /users/self:
    get:
      tags:
        - User Self Service APIs
      summary: Get user details
      description: >-
        This API allows a logged in user to get his own details from the fabric
        Identity. The API is designed to return the details of the user whose
        bearer token is sent in the header.
      operationId: getUserDetailsBySelf
      responses:
        '200':
          description: User Identity Object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSelf'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    UserSelf:
      description: User Self Details. For shoppers, accounts property will be empty.
      type: object
      properties:
        id:
          type: string
          description: User Id
          example: 1234-1234-1234
        status:
          type: string
          description: User Status
          example: active
        isStaffUserFederated:
          type: boolean
          description: User Staff Federated
          example: true
        loginId:
          type: string
          description: User Login Id
          example: sdsdf232ew-123asdaa-1231231
        orgId:
          type: string
          description: User Organization Id
          example: 123123-23wdd-123234
        email:
          type: string
          description: User Email Id
          format: email
          example: test.user@foobar.com
        primarycontact:
          type: string
          description: User Primary Contact
          example: +1 650 333 4444
        firstName:
          type: string
          description: User First Name
          example: Test
        lastName:
          type: string
          description: User Last Name
          example: User
        meta:
          type: object
          additionalProperties:
            type: string
          example:
            fabricBirthDate: 28-20-2000
        accounts:
          type: object
          description: User Accounts
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/UserSelfAccounts'
    UserSelfAccounts:
      properties:
        id:
          type: string
          description: Account Id
          example: '87324516'
        name:
          type: string
          description: Account Name
          example: Customer ABC Sandbox
        permissions:
          type: array
          items:
            type: string
          description: Account Permissions
          example:
            - access-control:v1:roles:get
            - access-control:v1:roles:list
        tenantId:
          type: string
          example: 60c91750fa8d3e000854e8ea
    Message:
      type: object
      properties:
        code:
          type: string
          enum:
            - INTERNAL_SERVER_ERROR
            - RECORD_NOT_FOUND
            - REQUEST_DENIED
            - INSUFFICIENT_PARAMS
            - INVALID_USER_ACCOUNT
            - USER_NOT_FOUND
            - ACCOUNT_EXISTS
            - BAD_REQUEST
        message:
          type: string
      required:
        - code
        - message
  responses:
    Unauthorized:
      description: User is not allowed to perform the action
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
          example:
            code: REQUEST_DENIED
            message: User does not have the required permission
    InternalServerError:
      description: The request was received but an internal error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
          example:
            code: INTERNAL_SERVER_ERROR
            message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````