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

Credentials []UserCredentialUnionoptional

Authentication credentials for this user, each carrying its identity provider for federation credentials. Populated only when expand[]=credentials is set on the listing endpoint.

Accepts one of the following:
type UserCredentialUserCredentialFederation struct{…}

Federation credential: the user authenticates through an identity provider.

CreatedAt Time

Entity creation timestamp

formatdate-time
ProviderID string

ID of the identity provider backing this credential. null when the source provider has been deleted.

Type string
UpdatedAt Time

Entity update timestamp

formatdate-time
Issuer stringoptional

Issuer identifier of the identity provider.

Provider Provideroptional

A Provider is a system that supplies access to Resources and allows actors (Users or Applications) to authenticate.

ID string

Unique identifier of the provider

CreatedAt Time

Entity creation timestamp

formatdate-time
Identifier string

User specified identifier, unique within the zone

minLength1
maxLength2048
Name string

Human-readable name

minLength1
maxLength255
OrganizationID string

Organization that owns this provider

OwnerType ProviderOwnerType

Who owns this provider. Platform-owned providers cannot be modified via API.

Accepts one of the following:
const ProviderOwnerTypePlatform ProviderOwnerType = "platform"
const ProviderOwnerTypeCustomer ProviderOwnerType = "customer"
Slug string

URL-safe identifier, unique within the zone

minLength1
maxLength63
UpdatedAt Time

Entity update timestamp

formatdate-time
ZoneID string

Zone this provider belongs to

ClientID stringoptional

OAuth 2.0 client identifier

ClientSecretSet booloptional

Indicates whether a client secret is configured

Description stringoptional

Human-readable description

maxLength2048
Metadata ProviderMetadataoptional

Provider metadata

IconURL stringoptional

Icon URL

formaturi
maxLength2048
Protocols ProviderProtocolsoptional

Protocol-specific configuration

Oauth2 ProviderProtocolsOauth2optional

OAuth 2.0 protocol configuration

Issuer string

OIDC issuer URL used for discovery and token validation.

formaturi
AuthorizationEndpoint stringoptional
formaturi
AuthorizationParameters map[string, string]optional

Custom query parameters appended to authorization redirect URLs. Use for non-standard providers (e.g. Google prompt=consent, access_type=offline).

AuthorizationResourceEnabled booloptional

Whether to include the resource parameter in authorization requests.

AuthorizationResourceParameter stringoptional

The resource parameter value to include in authorization requests. Defaults to "resource" when authorization_resource_enabled is true.

CodeChallengeMethodsSupported []stringoptional
JwksUri stringoptional
formaturi
RegistrationEndpoint stringoptional
formaturi
ScopeParameter stringoptional

The query parameter name for scopes in authorization requests. Defaults to "scope". Slack v2 uses "user_scope".

ScopeSeparator stringoptional

The separator character for scope values. Defaults to " " (space). Slack v2 uses ",".

ScopesSupported []stringoptional
TokenEndpoint stringoptional
formaturi
TokenResponseAccessTokenPointer stringoptional

Dot-separated path to the access token in the token response body. Defaults to "access_token". Slack v2 uses "authed_user.access_token".

Openid ProviderProtocolsOpenidoptional

OpenID Connect protocol configuration

Scopes []stringoptional

Additional OIDC scopes to request from this provider during authentication (e.g. "groups"). Merged with the default scopes (openid, profile, email).

SingleLogoutEnabled booloptional

When true, logging out of the zone propagates the logout to this provider's end_session_endpoint (RP-initiated logout). Defaults to false.

UserIdentifierClaim stringoptional

Name of a top-level string claim in this provider's ID Token to use as the user identifier on user creation. When not set, the user's Keycard ID is used.

UserinfoEndpoint stringoptional
formaturi
Type ProviderTypeoptional
Accepts one of the following:
const ProviderTypeExternal ProviderType = "external"
const ProviderTypeKeycardVault ProviderType = "keycard-vault"
const ProviderTypeKeycardSts ProviderType = "keycard-sts"
Subject stringoptional

Subject identifier from the identity provider.

type UserCredentialUserCredentialPassword struct{…}

Password credential: the user authenticates with email and password. The email lives on the user.

CreatedAt Time

Entity creation timestamp

formatdate-time
Type string
UpdatedAt Time

Entity update timestamp

formatdate-time
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

Role identifier: a lowercase slug (letters and digits separated by single hyphens or underscores), unique per owner type within a zone. Role identifiers surface in policy evaluation, so the slug restriction keeps them unambiguous in policy text.

minLength1
maxLength255
RoleOwnerType string

Owner type of the granted role. Disambiguates roles that share an identifier across owner types.

Accepts one of the following:
const UserRoleAssignmentRoleOwnerTypePlatform UserRoleAssignmentRoleOwnerType = "platform"
const UserRoleAssignmentRoleOwnerTypeCustomer UserRoleAssignmentRoleOwnerType = "customer"
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