scopes
Creates, updates, deletes, gets or lists a scopes
resource.
Overview
Name | scopes |
Type | Resource |
Id | okta.authorizationservers.scopes |
Fields
The following fields are returned by SELECT
queries:
- list_oauth2_scopes
- get_oauth2_scope
Name | Datatype | Description |
---|---|---|
id | string | Scope object ID |
name | string | Scope name |
_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. |
consent | string | Indicates whether a consent dialog is needed for the Scope (default: IMPLICIT) |
default | boolean | Indicates if this Scope is a default scope |
description | string | Description of the Scope |
displayName | string | Name of the end user displayed in a consent dialog |
metadataPublish | string | Indicates whether the Scope is included in the metadata (default: NO_CLIENTS) |
optional | boolean | Indicates whether the Scope is optional. When set to true , the user can skip consent for the scope. |
system | boolean | Indicates if Okta created the Scope |
Name | Datatype | Description |
---|---|---|
id | string | Scope object ID |
name | string | Scope name |
_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. |
consent | string | Indicates whether a consent dialog is needed for the Scope (default: IMPLICIT) |
default | boolean | Indicates if this Scope is a default scope |
description | string | Description of the Scope |
displayName | string | Name of the end user displayed in a consent dialog |
metadataPublish | string | Indicates whether the Scope is included in the metadata (default: NO_CLIENTS) |
optional | boolean | Indicates whether the Scope is optional. When set to true , the user can skip consent for the scope. |
system | boolean | Indicates if Okta created the Scope |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_oauth2_scopes | select | subdomain | q , filter , after , limit | Lists all custom token scopes |
get_oauth2_scope | select | subdomain | Retrieves a custom token scope | |
create_oauth2_scope | insert | subdomain , data__name | Creates a custom token scope | |
replace_oauth2_scope | replace | subdomain , data__name | Replaces a custom token scope | |
delete_oauth2_scope | delete | subdomain | Deletes a custom token scope |
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 | The 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) |
after | string | Specifies the pagination cursor for the next page of scopes. Treat the after cursor as an opaque value and obtain it through the next link relationship. See Pagination. |
filter | string | Filter expression for Custom Token Scopes |
limit | integer | Specifies the number of objects to return per page. If there are multiple pages of results, the Link header contains a next link that you need to use as an opaque value (follow it, don't parse it). See Pagination. |
q | string | Searches the name of Custom Token Scopes for matching values |
SELECT
examples
- list_oauth2_scopes
- get_oauth2_scope
Lists all custom token scopes
SELECT
id,
name,
_links,
consent,
default,
description,
displayName,
metadataPublish,
optional,
system
FROM okta.authorizationservers.scopes
WHERE subdomain = '{{ subdomain }}' -- required
AND q = '{{ q }}'
AND filter = '{{ filter }}'
AND after = '{{ after }}'
AND limit = '{{ limit }}';
Retrieves a custom token scope
SELECT
id,
name,
_links,
consent,
default,
description,
displayName,
metadataPublish,
optional,
system
FROM okta.authorizationservers.scopes
WHERE subdomain = '{{ subdomain }}' -- required;
INSERT
examples
- create_oauth2_scope
- Manifest
Creates a custom token scope
INSERT INTO okta.authorizationservers.scopes (
data__consent,
data__default,
data__description,
data__displayName,
data__metadataPublish,
data__name,
data__optional,
data__system,
subdomain
)
SELECT
'{{ consent }}',
{{ default }},
'{{ description }}',
'{{ displayName }}',
'{{ metadataPublish }}',
'{{ name }}' --required,
{{ optional }},
{{ system }},
'{{ subdomain }}'
RETURNING
id,
name,
_links,
consent,
default,
description,
displayName,
metadataPublish,
optional,
system
;
# Description fields are for documentation purposes
- name: scopes
props:
- name: subdomain
value: string
description: Required parameter for the scopes resource.
- name: consent
value: string
description: >
Indicates whether a consent dialog is needed for the Scope
valid_values: ['FLEXIBLE', 'IMPLICIT', 'REQUIRED']
default: IMPLICIT
- name: default
value: boolean
description: >
Indicates if this Scope is a default scope
default: false
- name: description
value: string
description: >
Description of the Scope
- name: displayName
value: string
description: >
Name of the end user displayed in a consent dialog
- name: metadataPublish
value: string
description: >
Indicates whether the Scope is included in the metadata
valid_values: ['ALL_CLIENTS', 'NO_CLIENTS']
default: NO_CLIENTS
- name: name
value: string
description: >
Scope name
- name: optional
value: boolean
description: >
Indicates whether the Scope is optional. When set to `true`, the user can skip consent for the scope.
default: false
- name: system
value: boolean
description: >
Indicates if Okta created the Scope
default: false
REPLACE
examples
- replace_oauth2_scope
Replaces a custom token scope
REPLACE okta.authorizationservers.scopes
SET
data__consent = '{{ consent }}',
data__default = {{ default }},
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__metadataPublish = '{{ metadataPublish }}',
data__name = '{{ name }}',
data__optional = {{ optional }},
data__system = {{ system }}
WHERE
subdomain = '{{ subdomain }}' --required
AND data__name = '{{ name }}' --required
RETURNING
id,
name,
_links,
consent,
default,
description,
displayName,
metadataPublish,
optional,
system;
DELETE
examples
- delete_oauth2_scope
Deletes a custom token scope
DELETE FROM okta.authorizationservers.scopes
WHERE subdomain = '{{ subdomain }}' --required;