Skip to content

The calling principal and its tenant grants

GET
/v1/auth/whoami
curl --request GET \
--url https://example.com/v1/auth/whoami \
--header 'Authorization: Bearer <token>'

Returns the calling principal, its tenant grants, and the effective permission set it holds in each of them.

OK

Media type application/json
object
aal

Authentication assurance level (sessions only)

integer
actor
required
string
amr

Authentication method references (sessions only)

Array<string>
display_name
string
grants
Array<object>
object
confined_workspace

Present only when this membership is confined to a workspace: the principal may act only within it, enforced server-side on every request.

string
permissions
required

The principal’s EFFECTIVE permission set in this tenant, sorted. The console answers “may I?” by membership of this set. It is the tenant-wide RBAC floor over the permissions this binary serves, minus the workspace-confinement forbids that hold regardless of target; authored scoped grants/forbids and the ABAC deny-overlay are decided per resource and are NOT reflected.

Array<string>
role
required
string
tenant
required
string
kind
required
string
Allowed values: user token
superadmin
required
boolean
user_id
required
string format: uuid
Example
{
"kind": "user"
}

Bad request

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}

Unauthenticated

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}

Forbidden

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}

Not found

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}

Conflict / setup required

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}

Rate limited

Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{
"error": {
"code": "example",
"message": "example"
}
}