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

# Get Current Principal

> Gets the currently logged in user's information, even in Online.

Does not call an agent - just returns the current session info.



## OpenAPI

````yaml /openapi/rest/openapi-v3-User.json get /api/v1/User/currentPrincipal
openapi: 3.0.0
info:
  version: v1-REST
  title: SuperOffice REST API v1
  description: SuperOffice REST API - User
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/User/currentPrincipal:
    get:
      tags:
        - User
      summary: Get Current Principal
      description: |-
        Gets the currently logged in user's information, even in Online.

        Does not call an agent - just returns the current session info.
      operationId: v1User_GetCurrentPrincipal
      parameters:
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
            application/json-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
            application/merge-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SoPrincipalCarrier
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.CRM.Services.SoPrincipalCarrier:
      description: Summary description for SoPrincipalCarrier.
      type: object
      properties:
        UserType:
          description: Type of user
          enum:
            - Unknown
            - InternalAssociate
            - ResourceAssociate
            - ExternalAssociate
            - AnonymousAssociate
            - SystemAssociate
          type: string
        Associate:
          description: Associate name (e.g. logon name) for the user
          type: string
        AssociateId:
          format: int32
          description: AssociateId for the user.
          type: integer
        IsPerson:
          description: Is this associate a person, and not a resource?
          type: boolean
        PersonId:
          format: int32
          description: Associate's person id
          type: integer
        CountryId:
          format: int32
          description: Country id for the user.
          type: integer
        HomeCountryId:
          format: int32
          description: >-
            Country id for the user's home country.  This is the default country
            id when creating new items.
          type: integer
        ContactId:
          format: int32
          description: Company of the associate's person
          type: integer
        GroupId:
          format: int32
          description: Associate's group_idx
          type: integer
        BusinessId:
          format: int32
          description: BusinessIdx for the company that the user belongs to.
          type: integer
        CategoryId:
          format: int32
          description: CategoryIdx of the company that the user belongs to.
          type: integer
        ContactOwner:
          format: int32
          description: Owner (AssocaiteId) of the company that the user belongs to.
          type: integer
        RoleId:
          format: int32
          description: Id of the users role
          type: integer
        RoleName:
          description: Name of the users role
          type: string
        RoleDescription:
          description: Descrtiption (e.g. tooltip) for the users role
          type: string
        RoleType:
          description: Type of user.
          enum:
            - Employee
            - ExternalUser
            - Anonymous
            - System
          type: string
        Licenses:
          description: License granted to the site and user.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.GrantedModuleLicense'
        FullName:
          description: >-
            The Person full name if the associate is a person. Use IsPerson to
            check
          type: string
        EMailAddress:
          description: >-
            The Person e-mail address if the associate is a person. Use IsPerson
            to check
          type: string
        FunctionRights:
          description: >-
            Functional rights for the user.  This array is sorted so a lookup
            can be performed using
            {M:System.Array.BinarySearch(System.Array,System.Int32,System.Int32,System.Object)}.
          type: array
          items:
            type: string
        EjUserId:
          format: int32
          description: Primary key in eJournal's old user table.
          type: integer
        EjAccessLevel:
          format: int32
          description: eJournal user access level
          type: integer
        EjUserStatus:
          description: eJournal user status
          enum:
            - StatusNone
            - StatusNormal
            - StatusNotAvailable
            - StatusDeleted
            - StatusReadOnly
            - StatusSpm
            - StatusSystem
          type: string
        ProvidedCredentials:
          description: The credentials used for authenticating this user.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.ProvidedCredential'
        SecondaryGroups:
          description: Secondary user groups
          type: array
          items:
            format: int32
            type: integer
        DatabaseContextIdentifier:
          description: Name of the database context
          type: string
        UserName:
          description: UserName on associatetable. Same as SuperId from Online
          type: string
    SuperOffice.CRM.Services.GrantedModuleLicense:
      description: Represents a single module license granted to a user.
      type: object
      properties:
        OwnerId:
          format: int32
          description: Primary key of the ModuleOwner row.
          type: integer
        OwnerName:
          description: "Unique name identifying the module owner. \r\nMust match primer data installed by module. e.g. \"SUPEROFFICE\" or \"ADWIZA\""
          type: string
        OwnerDescription:
          description: Description of the owner module as shown in the user interface.
          type: string
        ModuleId:
          format: int32
          description: Primary key for ModuleLicense row
          type: integer
        Name:
          description: Unique name identifying the module. e.g. "WINCAL" or "SUPERSERVER"
          type: string
        Description:
          description: Name of the module as shown in the user interface.
          type: string
        Version:
          description: Version of the module license (for future use).
          type: string
        LicenseType:
          description: 'Type of license: site(1), satellite(2), user(3)'
          enum:
            - Unknown
            - SiteLicense
            - SatelliteLicense
            - UserLicense
          type: string
        ExtraFlags:
          format: int32
          description: Any additional data the license module needs.
          type: integer
        ExtraInfo:
          description: Any additional data the license module needs.
          type: string
        SortOrder:
          format: int32
          description: Order in which licenses are sorted in the license calculations.
          type: integer
        LicenseNumber:
          format: int32
          description: Number of licenses granted.
          type: integer
        IsHidden:
          description: "Is the license hidden from the user? \r\nHidden licenses are usually feature-specific, part of a larger bundle."
          type: boolean
        IsUnrestricted:
          description: Is the license limited to the number of licenses?
          type: boolean
        ExpiryDate:
          format: date-time
          description: Expiry date for the license.
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.ProvidedCredential:
      description: Summary description for ProvidedCredential.
      type: object
      properties:
        Type:
          type: string
        SearchName:
          type: string
        DisplayName:
          type: string
        CredentialId:
          format: int32
          type: integer
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [WebAPI changes in SuperOffice 12.2](/release-notes/12/api/changes-webapi-12.2.2072.0.md)
- [SuperOffice.WebApi.Agents.UserAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.UserAgent.md)
- [Get Current](/en/api/reference/restful/agent/viewstate_agent/get-current.md)
- [Get Current Account](/en/api/reference/restful/agent/email_agent/get-current-account.md)
- [Get Current Token](/en/api/reference/restful/rest/user/get-current-token.md)
- [Get Next Current](/en/api/reference/restful/agent/viewstate_agent/get-next-current.md)
