Skip to main content

user_risk

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

Overview​

Nameuser_risk
TypeResource
Idokta.users.user_risk

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
riskLevelstringThe risk level associated with the user (HIGH, LOW, MEDIUM, NONE)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_user_riskselectuserId, subdomainRetrieves the user risk object for a user ID
upsert_user_riskreplaceuserId, subdomain, riskLevelUpserts (creates or updates) the user risk object for a user ID. You can optionally provide a riskReason to describe why the risk level is being changed. If riskReason isn't provided, the reason defaults to override.by.admin.

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
subdomainstring(default: my-org)
userIdstringID of an existing Okta user

SELECT examples​

Retrieves the user risk object for a user ID

SELECT
_links,
riskLevel
FROM okta.users.user_risk
WHERE userId = '{{ userId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

REPLACE examples​

Upserts (creates or updates) the user risk object for a user ID. You can optionally provide a riskReason to describe why the risk level is being changed. If riskReason isn't provided, the reason defaults to override.by.admin.

REPLACE okta.users.user_risk
SET
riskLevel = '{{ riskLevel }}',
riskReason = '{{ riskReason }}'
WHERE
userId = '{{ userId }}' --required
AND subdomain = '{{ subdomain }}' --required
AND riskLevel = '{{ riskLevel }}' --required
RETURNING
_links,
reason,
riskLevel;