Skip to main content

claims

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

Overview

Nameclaims
TypeResource
Idokta.authorizationservers.claims

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the Claim
namestringName of the Claim
_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.
alwaysIncludeInTokenbooleanSpecifies whether to include Claims in the token. The value is always TRUE for access token Claims. If the value is set to FALSE for an ID token claim, the Claim isn't included in the ID token when the token is requested with the access token or with the authorization_code. The client instead uses the access token to get Claims from the /userinfo endpoint.
claimTypestringSpecifies whether the Claim is for an access token (RESOURCE) or an ID token (IDENTITY)
conditionsobjectSpecifies the scopes for the Claim
group_filter_typestringSpecifies the type of group filter if valueType is GROUPS If valueType is GROUPS, then the groups returned are filtered according to the value of group_filter_type. If you have complex filters for Groups, you can create a Groups allowlist to put them all in a Claim.
statusstring
systembooleanWhen true, indicates that Okta created the Claim
valuestringSpecifies the value of the Claim. This value must be a string literal if valueType is GROUPS, and the string literal is matched with the selected group_filter_type. The value must be an Okta EL expression if valueType is EXPRESSION.
valueTypestringSpecifies whether the Claim is an Okta Expression Language (EL) expression (EXPRESSION), a set of groups (GROUPS), or a system claim (SYSTEM)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_oauth2_claimsselectsubdomainLists all custom token Claims defined for a specified custom authorization server
get_oauth2_claimselectsubdomainRetrieves a custom token Claim by the specified claimId
create_oauth2_claiminsertsubdomainCreates a custom token Claim for a custom authorization server
replace_oauth2_claimreplacesubdomainReplaces a custom token Claim specified by the claimId
delete_oauth2_claimdeletesubdomainDeletes a custom token Claim specified by the claimId

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
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)

SELECT examples

Lists all custom token Claims defined for a specified custom authorization server

SELECT
id,
name,
_links,
alwaysIncludeInToken,
claimType,
conditions,
group_filter_type,
status,
system,
value,
valueType
FROM okta.authorizationservers.claims
WHERE subdomain = '{{ subdomain }}' -- required;

INSERT examples

Creates a custom token Claim for a custom authorization server

INSERT INTO okta.authorizationservers.claims (
data__alwaysIncludeInToken,
data__claimType,
data__conditions,
data__group_filter_type,
data__name,
data__status,
data__system,
data__value,
data__valueType,
subdomain
)
SELECT
{{ alwaysIncludeInToken }},
'{{ claimType }}',
'{{ conditions }}',
'{{ group_filter_type }}',
'{{ name }}',
'{{ status }}',
{{ system }},
'{{ value }}',
'{{ valueType }}',
'{{ subdomain }}'
RETURNING
id,
name,
_links,
alwaysIncludeInToken,
claimType,
conditions,
group_filter_type,
status,
system,
value,
valueType
;

REPLACE examples

Replaces a custom token Claim specified by the claimId

REPLACE okta.authorizationservers.claims
SET
data__alwaysIncludeInToken = {{ alwaysIncludeInToken }},
data__claimType = '{{ claimType }}',
data__conditions = '{{ conditions }}',
data__group_filter_type = '{{ group_filter_type }}',
data__name = '{{ name }}',
data__status = '{{ status }}',
data__system = {{ system }},
data__value = '{{ value }}',
data__valueType = '{{ valueType }}'
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
_links,
alwaysIncludeInToken,
claimType,
conditions,
group_filter_type,
status,
system,
value,
valueType;

DELETE examples

Deletes a custom token Claim specified by the claimId

DELETE FROM okta.authorizationservers.claims
WHERE subdomain = '{{ subdomain }}' --required;