---
title: "Gets the currently authenticated and authorized bdms user."
method: GET
path: "/api/v{version}/user/self"
tags: ["User"]
---

# Gets the currently authenticated and authorized bdms user.

`GET /api/v{version}/user/self`

## Path parameters

- `version` string, required

## Response `200`

Returns the currently logged in user.

- User — Represents a user entity in the database.
  - `id` integer, required
  - `name` string — Gets or sets the BDMS.Models.User name.
  - `subjectId` string — Gets or sets the BDMS.Models.Users subject id provided by oidc.
  - `firstName` string — Gets or sets the BDMS.Models.Users firstname.
  - `lastName` string — Gets or sets the BDMS.Models.Users lastname.
  - `email` string — Gets or sets the BDMS.Models.Users email.
  - `isAdmin` boolean — Gets or sets whether the BDMS.Models.User has admin privileges.
  - `isDisabled` boolean — Gets the value whether the BDMS.Models.User is disabled or not.
  - `disabledAt` string, date-time, nullable — Gets or sets the timestamp from the moment a BDMS.Models.User got disabled.
  - `createdAt` string, date-time, nullable — Gets or sets the timestamp from the moment a BDMS.Models.User got disabled.
  - `settings` string, nullable — Gets or sets the BDMS.Models.Users settings.
  - `workgroupRoles` UserWorkgroupRole[] — Gets the WorkgroupRoles.
    - `userId` integer, required — Gets or sets the foreign key to the BDMS.Models.UserWorkgroupRole.User entity.
    - `user` User — recursive
    - `workgroupId` integer, required — Gets or sets the foreign key to the BDMS.Models.UserWorkgroupRole.Workgroup entity.
    - `workgroup` Workgroup — Represents a workgroup entity in the database.
      - `id` integer, required
      - `name` string, required — Gets or sets the name of the workgroup.
      - `createdAt` string, date-time, nullable — Gets or sets the BDMS.Models.Workgroup created date.
      - `disabledAt` string, date-time, nullable — Gets or sets the BDMS.Models.Workgroup disabled date.
      - `isDisabled` boolean — Gets the value whether the BDMS.Models.Workgroup is disabled or not.
      - `settings` string, nullable — Gets or sets the Settings for the BDMS.Models.Workgroup.
      - `boreholeCount` integer — Number of boreholes in the workgroup.
    - `role` 'View' | 'Editor' | 'Controller' | 'Validator' | 'Publisher' — Represents a role entity in the database.
    - `isActive` boolean, nullable — Gets or sets whether the role is active or not.
  - `termsAccepted` TermsAccepted[] — Gets the TermsAccepted.
    - `userId` integer, required — Gets or sets the foreign key to the BDMS.Models.TermsAccepted.User entity.
    - `user` User — recursive
    - `termId` integer, required — Gets or sets the foreign key to the BDMS.Models.TermsAccepted.Term entity.
    - `term` Term — Represents a term entity in the database.
      - `id` integer, required
      - `isDraft` boolean — Gets or sets whetther the BDMS.Models.Term is a draft.
      - `textEn` string — Gets or sets the BDMS.Models.Term's english text.
      - `textDe` string, nullable — Gets or sets the BDMS.Models.Term's german text.
      - `textFr` string, nullable — Gets or sets the BDMS.Models.Term's french text.
      - `textIt` string, nullable — Gets or sets the BDMS.Models.Term's italian text.
      - `textRo` string, nullable — Gets or sets the BDMS.Models.Term's romansch text.
      - `creation` string, date-time — Gets or sets the BDMS.Models.Term's creation date.
      - `expiration` string, date-time, nullable — Gets or sets the BDMS.Models.Term's expiration date.
    - `acceptedAt` string, date-time — Gets or sets the timestamp from the moment the terms got accepted.
  - `deletable` boolean, nullable — Gets or sets whether this user can be deleted.

---

[API](https://skmtc.net/geoadmin/apis/boreholes-rest-api-v2.md) · [All operations](https://skmtc.net/geoadmin/apis/boreholes-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geoadmin/boreholes-rest-api-v2/versions/e6d0b4ee0f52/schema)
