Skip to content
Docs

Users

Users

List users
client.Zones.Users.List(ctx, zoneID, query) (*ZoneUserListResponse, error)
GET/zones/{zoneId}/users
Get user
client.Zones.Users.Get(ctx, id, query) (*User, error)
GET/zones/{zoneId}/users/{id}
ModelsExpand Collapse
type User struct{…}

An authenticated user entity

ID string

Unique identifier of the user

CreatedAt Time

Entity creation timestamp

formatdate-time
Email string

Email address of the user

formatemail
EmailVerified bool

Whether the email address has been verified

Identifier string

Zone-scoped user identifier. Defaults to the user's Keycard ID. When the provider has user_identifier_claim configured, the value is set from that claim at user creation time.

OrganizationID string

Organization that owns this user

Status UserStatus

Status of the user. Disabled users cannot authenticate.

Accepts one of the following:
const UserStatusActive UserStatus = "active"
const UserStatusDisabled UserStatus = "disabled"
UpdatedAt Time

Entity update timestamp

formatdate-time
ZoneID string

Zone this user belongs to

AuthenticatedAt stringoptional

Date when the user was last authenticated

GrantCount int64optional

Delegated-grant count for this user. Populated only when expand[]=grant_count is set on the listing endpoint.

minimum0
Issuer stringoptional

Issuer identifier of the identity provider

ProviderID stringoptional

Reference to the identity provider. This field is undefined when the source identity provider is deleted but the user is not deleted.

RoleAssignments []UserRoleAssignmentoptional

Role grants for this user within the zone. Populated only when expand[]=role-assignments is set on the listing endpoint.

RoleID string

ID of the assigned role

RoleIdentifier string

Opaque role identifier. Treated as an opaque identifier by the API and unique within a zone.

minLength1
maxLength255
Scope UserRoleAssignmentScope

The resource this grant is scoped to, or null when the grant is unscoped (applies to the owning zone itself).

ID string

The ID of the scoped resource.

Type string

The kind of resource this grant is scoped to (e.g. zone).

SessionCount int64optional

Session count for this user. Populated only when expand[]=session_count is set on the listing endpoint.

minimum0
Subject stringoptional

Subject identifier from the identity provider