Skip to main content

last_seen_identity

Creates, updates, deletes, gets or lists a last_seen_identity resource.

Overview

Namelast_seen_identity
TypeResource
Idcloudflare.zero_trust.last_seen_identity

Fields

The following fields are returned by SELECT queries:

Get active session response

NameDatatypeDescription
account_idstring (example: 1234567890)
device_idstring (example: )
service_token_idstring (example: )
common_namestring (example: )
auth_statusstring (example: NONE)
devicePostureobject
device_sessionsobject
emailstring (example: test@cloudflare.com)
geoobject
iatnumber
idpobject
ipstring (example: 127.0.0.0)
is_gatewayboolean
is_warpboolean
mtls_authobject
service_token_statusboolean
user_uuidstring (example: 57cf8cf2-f55a-4588-9ac9-f5e41e9f09b4)
versionnumber

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectuser_id, account_idGet last seen identity for a single user.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
user_idstringThe user ID.

SELECT examples

Get last seen identity for a single user.

SELECT
account_id,
device_id,
service_token_id,
common_name,
auth_status,
devicePosture,
device_sessions,
email,
geo,
iat,
idp,
ip,
is_gateway,
is_warp,
mtls_auth,
service_token_status,
user_uuid,
version
FROM cloudflare.zero_trust.last_seen_identity
WHERE user_id = '{{ user_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;