user_risk
Creates, updates, deletes, gets or lists a user_risk resource.
Overview​
| Name | user_risk |
| Type | Resource |
| Id | okta.users.user_risk |
Fields​
The following fields are returned by SELECT queries:
- get_user_risk
| Name | Datatype | Description |
|---|---|---|
_links | object | Specifies 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. |
riskLevel | string | The risk level associated with the user (HIGH, LOW, MEDIUM, NONE) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_user_risk | select | userId, subdomain | Retrieves the user risk object for a user ID | |
upsert_user_risk | replace | userId, subdomain, riskLevel | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
subdomain | string | (default: my-org) |
userId | string | ID of an existing Okta user |
SELECT examples​
- get_user_risk
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​
- upsert_user_risk
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;