---
title: "Get the authorization data for the logged in user"
method: GET
path: "/whoami"
tags: ["Authentication"]
---

# Get the authorization data for the logged in user

`GET /whoami`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/whoami`
- Auth: none declared

Returns the authorization data for the logged in user.

## Query parameters

- `roles` 'names' | 'ids'

## Response `200`

Authorization data for a user

- AuthenticationWhoAmIResponse200
  - `id` string: String representation of a MongoDB ObjectId
  - `provenance` string: The name of the AAA adapter from which the user logged in
  - `username` string: The username of the logged in user
  - `firstname` string: The first name of the logged in user
  - `groups` WhoamiGetResponsesContentApplicationJsonSchemaGroupsItems[]: An array of groups which contain the logged in user
    - `id` string: String representation of a MongoDB ObjectId
    - `provenance` string: The name of the AAA adapter which contains the group
    - `name` string: The name of the group
  - `roles` IapCommonSchemaObjectId[]: Array of roles user has access to
  - `roleNames` string[]: Array of role names that user has access to
  - `routes` string[]: Array of routes logged in user has access to
  - `methods` object: Map of service names and method names which the user has access to

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
