Skip to content
Start here

Users

Get users
zero_trust.access.users.list(UserListParams**kwargs) -> SyncV4PagePaginationArray[UserListResponse]
GET/accounts/{account_id}/access/users
Get a user
zero_trust.access.users.get(struser_id, UserGetParams**kwargs) -> UserGetResponse
GET/accounts/{account_id}/access/users/{user_id}
Create a user
zero_trust.access.users.create(UserCreateParams**kwargs) -> UserCreateResponse
POST/accounts/{account_id}/access/users
Update a user
zero_trust.access.users.update(struser_id, UserUpdateParams**kwargs) -> UserUpdateResponse
PUT/accounts/{account_id}/access/users/{user_id}
Delete a user
zero_trust.access.users.delete(struser_id, UserDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/access/users/{user_id}
ModelsExpand Collapse
class AccessUser:
id: Optional[str]

The unique Cloudflare-generated Id of the SCIM resource.

active: Optional[bool]

Determines the status of the SCIM User resource.

display_name: Optional[str]

The name of the SCIM User resource.

emails: Optional[List[Email]]
primary: Optional[bool]

Indicates if the email address is the primary email belonging to the SCIM User resource.

type: Optional[str]

Indicates the type of the email address.

value: Optional[str]

The email address of the SCIM User resource.

formatemail
external_id: Optional[str]

The IdP-generated Id of the SCIM resource.

meta: Optional[Meta]

The metadata of the SCIM resource.

created: Optional[datetime]

The timestamp of when the SCIM resource was created.

formatdate-time
last_modified: Optional[datetime]

The timestamp of when the SCIM resource was last modified.

formatdate-time
schemas: Optional[List[str]]

The list of URIs which indicate the attributes contained within a SCIM resource.

class UserListResponse:
id: Optional[str]

UUID.

maxLength36
access_seat: Optional[bool]

True if the user has authenticated with Cloudflare Access.

active_device_count: Optional[float]

The number of active devices registered to the user.

created_at: Optional[datetime]
formatdate-time
email: Optional[str]

The email of the user.

formatemail
gateway_seat: Optional[bool]

True if the user has logged into the WARP client.

last_successful_login: Optional[datetime]

The time at which the user last successfully logged in.

formatdate-time
name: Optional[str]

The name of the user.

seat_uid: Optional[str]

The unique API identifier for the Zero Trust seat.

uid: Optional[str]

The unique API identifier for the user.

updated_at: Optional[datetime]
formatdate-time
class UserGetResponse:
id: Optional[str]

UUID.

maxLength36
access_seat: Optional[bool]

True if the user has authenticated with Cloudflare Access.

active_device_count: Optional[float]

The number of active devices registered to the user.

created_at: Optional[datetime]
formatdate-time
email: Optional[str]

The email of the user.

formatemail
gateway_seat: Optional[bool]

True if the user has logged into the WARP client.

last_successful_login: Optional[datetime]

The time at which the user last successfully logged in.

formatdate-time
name: Optional[str]

The name of the user.

seat_uid: Optional[str]

The unique API identifier for the Zero Trust seat.

uid: Optional[str]

The unique API identifier for the user.

updated_at: Optional[datetime]
formatdate-time
class UserCreateResponse:
id: Optional[str]

UUID.

maxLength36
access_seat: Optional[bool]

True if the user has authenticated with Cloudflare Access.

active_device_count: Optional[float]

The number of active devices registered to the user.

created_at: Optional[datetime]
formatdate-time
email: Optional[str]

The email of the user.

formatemail
gateway_seat: Optional[bool]

True if the user has logged into the WARP client.

last_successful_login: Optional[datetime]

The time at which the user last successfully logged in.

formatdate-time
name: Optional[str]

The name of the user.

seat_uid: Optional[str]

The unique API identifier for the Zero Trust seat.

uid: Optional[str]

The unique API identifier for the user.

updated_at: Optional[datetime]
formatdate-time
class UserUpdateResponse:
id: Optional[str]

UUID.

maxLength36
access_seat: Optional[bool]

True if the user has authenticated with Cloudflare Access.

active_device_count: Optional[float]

The number of active devices registered to the user.

created_at: Optional[datetime]
formatdate-time
email: Optional[str]

The email of the user.

formatemail
gateway_seat: Optional[bool]

True if the user has logged into the WARP client.

last_successful_login: Optional[datetime]

The time at which the user last successfully logged in.

formatdate-time
name: Optional[str]

The name of the user.

seat_uid: Optional[str]

The unique API identifier for the Zero Trust seat.

uid: Optional[str]

The unique API identifier for the user.

updated_at: Optional[datetime]
formatdate-time

UsersActive Sessions

Get active sessions
zero_trust.access.users.active_sessions.list(struser_id, ActiveSessionListParams**kwargs) -> SyncSinglePage[ActiveSessionListResponse]
GET/accounts/{account_id}/access/users/{user_id}/active_sessions
Get single active session
zero_trust.access.users.active_sessions.get(strnonce, ActiveSessionGetParams**kwargs) -> ActiveSessionGetResponse
GET/accounts/{account_id}/access/users/{user_id}/active_sessions/{nonce}
ModelsExpand Collapse
class ActiveSessionListResponse:
expiration: Optional[int]
metadata: Optional[Metadata]
apps: Optional[Dict[str, MetadataApps]]
hostname: Optional[str]
name: Optional[str]
type: Optional[str]
uid: Optional[str]
expires: Optional[int]
iat: Optional[int]
nonce: Optional[str]
ttl: Optional[int]
name: Optional[str]
class ActiveSessionGetResponse:
account_id: Optional[str]
auth_status: Optional[str]
common_name: Optional[str]
device_id: Optional[str]
device_sessions: Optional[Dict[str, DeviceSessions]]
last_authenticated: Optional[float]
device_posture: Optional[Dict[str, DevicePosture]]
id: Optional[str]
check: Optional[DevicePostureCheck]
exists: Optional[bool]
path: Optional[str]
data: Optional[object]
description: Optional[str]
error: Optional[str]
rule_name: Optional[str]
success: Optional[bool]
timestamp: Optional[str]
type: Optional[str]
email: Optional[str]
geo: Optional[UserPolicyCheckGeo]
iat: Optional[float]
idp: Optional[IdP]
id: Optional[str]
type: Optional[str]
ip: Optional[str]
is_gateway: Optional[bool]
is_warp: Optional[bool]
is_active: Optional[bool]
mtls_auth: Optional[MTLSAuth]
auth_status: Optional[str]
cert_issuer_dn: Optional[str]
cert_issuer_ski: Optional[str]
cert_presented: Optional[bool]
cert_serial: Optional[str]
service_token_id: Optional[str]
service_token_status: Optional[bool]
user_uuid: Optional[str]
version: Optional[float]

UsersLast Seen Identity

Get last seen identity
zero_trust.access.users.last_seen_identity.get(struser_id, LastSeenIdentityGetParams**kwargs) -> Identity
GET/accounts/{account_id}/access/users/{user_id}/last_seen_identity
ModelsExpand Collapse
class Identity:
account_id: Optional[str]
auth_status: Optional[str]
common_name: Optional[str]
device_id: Optional[str]
device_sessions: Optional[Dict[str, DeviceSessions]]
last_authenticated: Optional[float]
device_posture: Optional[Dict[str, DevicePosture]]
id: Optional[str]
check: Optional[DevicePostureCheck]
exists: Optional[bool]
path: Optional[str]
data: Optional[object]
description: Optional[str]
error: Optional[str]
rule_name: Optional[str]
success: Optional[bool]
timestamp: Optional[str]
type: Optional[str]
email: Optional[str]
geo: Optional[UserPolicyCheckGeo]
iat: Optional[float]
idp: Optional[IdP]
id: Optional[str]
type: Optional[str]
ip: Optional[str]
is_gateway: Optional[bool]
is_warp: Optional[bool]
mtls_auth: Optional[MTLSAuth]
auth_status: Optional[str]
cert_issuer_dn: Optional[str]
cert_issuer_ski: Optional[str]
cert_presented: Optional[bool]
cert_serial: Optional[str]
service_token_id: Optional[str]
service_token_status: Optional[bool]
user_uuid: Optional[str]
version: Optional[float]

UsersFailed Logins

Get failed logins
zero_trust.access.users.failed_logins.list(struser_id, FailedLoginListParams**kwargs) -> SyncSinglePage[FailedLoginListResponse]
GET/accounts/{account_id}/access/users/{user_id}/failed_logins
ModelsExpand Collapse
class FailedLoginListResponse:
expiration: Optional[int]
metadata: Optional[object]