The caller's own identity
const url = 'https://example.com/api/users/me';const options = {method: 'GET', headers: {'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/users/me \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'Sourced primarily from the session, with extra fields hydrated from the users table.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The session identity
object
object
ApprovableServiceAccounts is what the approval page’s picker is populated from: ServiceAccounts, plus the caller’s own accounts when cert_options.service.allow_user_accounts is on. Sent as its own list rather than computed in the browser so the picker cannot offer an account the server would then refuse.
DetailLevel is how much of the covered pages this person sees: “simplified” or “advanced”. Stored on the server so it follows the person between browsers; the email level is separate and travels with the notification preferences.
Extra holds operator-configured extra fields captured at login from OIDC claims (see config.OAuthFields.Extra). Each value is either a string or an array of strings, reflecting the claim shape at login. Missing or null values in this field are rendered as “MISSING” by key ID templates, so this presence is important for debugging when debugging a key ID template that expected a claim that did not arrive. The frontend should display missing values visibly rather than hiding them.
object
IsAdmin, IsSOC and IsAuditor report the access levels this session holds, so the UI can show the affordances each one unlocks. The roles nest — an admin holds all three, a SOC member holds SOC and auditor — so more than one is true at a time and the account page names every one rather than only the narrowest. Display only: the server re-checks the matching Grants* rule on every scoped request, so hiding or showing an affordance changes nothing about what this session can do.
IsNSSKeyAdmin reports the fleet key admin role (admin.nss_key_group, which admin implies): create keys and manage every one. Members of a single key’s group manage that key without it. Display only, like the three above.
Name is the caller’s human-readable name, for greeting them as a person rather than as an account. Display only, and empty when neither the identity provider nor the directory supplied one.
NSSEnabled reports nss.enabled, so the UI shows the fleet keys only where the server serves them.
OtherAccounts are alternate account identifiers this identity is known by on target systems (see config.OAuthFields.OtherAccounts), shown so a user can see every account name tied to their identity. These are also the candidates, alongside Username, that the approval page offers as principals for a user certificate (see ApproveRequestBody.Principals).
ServiceAccounts are the service accounts this identity holds (see config.OAuthFields.ServiceAccounts). It is also what the service codes page lists, so it stays the claim alone rather than the wider approval set below.
UserOwnServiceAccounts is the subset of ApprovableServiceAccounts that is the caller’s own account rather than a claimed service account, so the picker can say what those entries mean before one is chosen: the certificate is still non-interactive, for an unattended job, and is not a way to log in as yourself. Empty when cert_options.service.allow_user_accounts is off.
Example
{ "data": { "detail_level": "simplified" }}No valid session
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}