service_accounts
Creates, updates, deletes, gets or lists a service_accounts resource.
Overview​
| Name | service_accounts |
| Type | Resource |
| Id | okta.privileged_access.service_accounts |
Fields​
The following fields are returned by SELECT queries:
- get_app_service_account
- list_app_service_accounts
| Name | Datatype | Description |
|---|---|---|
id | string (regex) | The UUID of the app service account (pattern: (?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$, example: a747a818-a4c4-4446-8a87-704216495a08) |
name | string (regex) | The user-defined name for the app service account (pattern: ^[\w-_. ]+$, example: salesforce Prod-5 account) |
containerGlobalName | string | The key name of the app in the Okta Integration Network (OIN) (example: salesforce) |
containerInstanceName | string | The app instance label (example: salesforce Prod 5) |
containerOrn | string | The ORN of the relevant resource. Use the specific app ORN format (orn:{partition}:idp:{yourOrgId}:apps:{appType}:{appId}) to identify an Okta app instance in your org. (example: orn:okta:idp:00o1n8sbwArJ7OQRw406:apps:salesforce:0oa1gjh63g214q0Hq0g4) |
created | string (date-time) | Timestamp when the app service account was created |
description | string (regex) | The description of the app service account (example: This is for accessing salesforce Prod-5) |
lastUpdated | string (date-time) | Timestamp when the app service account was last updated |
ownerGroupIds | array | A list of IDs of the Okta groups who own the app service account |
ownerUserIds | array | A list of IDs of the Okta users who own the app service account |
password | string (password) | The app service account password |
status | string | Describes the current status of a service account (ALERT, ERROR, INFO, NO_ISSUES, UNSECURED) (example: UNSECURED) |
statusDetail | string | Describes the detailed status of a service account (CREATION_FAILED, MISSING_PASSWORD, PENDING, ROTATED, ROTATING, ROTATION_FAILED, STAGED, UNMANAGED, VAULTED) (example: STAGED) |
username | string | The username that serves as the direct link to your managed app account. Ensure that this value precisely matches the identifier of the target app account. (example: testuser-salesforce-5@example.com) |
| Name | Datatype | Description |
|---|---|---|
id | string (regex) | The UUID of the app service account (pattern: (?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$, example: a747a818-a4c4-4446-8a87-704216495a08) |
name | string (regex) | The user-defined name for the app service account (pattern: ^[\w-_. ]+$, example: salesforce Prod-5 account) |
containerGlobalName | string | The key name of the app in the Okta Integration Network (OIN) (example: salesforce) |
containerInstanceName | string | The app instance label (example: salesforce Prod 5) |
containerOrn | string | The ORN of the relevant resource. Use the specific app ORN format (orn:{partition}:idp:{yourOrgId}:apps:{appType}:{appId}) to identify an Okta app instance in your org. (example: orn:okta:idp:00o1n8sbwArJ7OQRw406:apps:salesforce:0oa1gjh63g214q0Hq0g4) |
created | string (date-time) | Timestamp when the app service account was created |
description | string (regex) | The description of the app service account (example: This is for accessing salesforce Prod-5) |
lastUpdated | string (date-time) | Timestamp when the app service account was last updated |
ownerGroupIds | array | A list of IDs of the Okta groups who own the app service account |
ownerUserIds | array | A list of IDs of the Okta users who own the app service account |
password | string (password) | The app service account password |
status | string | Describes the current status of a service account (ALERT, ERROR, INFO, NO_ISSUES, UNSECURED) (example: UNSECURED) |
statusDetail | string | Describes the detailed status of a service account (CREATION_FAILED, MISSING_PASSWORD, PENDING, ROTATED, ROTATING, ROTATION_FAILED, STAGED, UNMANAGED, VAULTED) (example: STAGED) |
username | string | The username that serves as the direct link to your managed app account. Ensure that this value precisely matches the identifier of the target app account. (example: testuser-salesforce-5@example.com) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_app_service_account | select | id, subdomain | Retrieves an app service account specified by ID | |
list_app_service_accounts | select | subdomain | limit, after, match | Lists all app service accounts |
create_app_service_account | insert | subdomain, name, containerOrn, username, password | Creates a new app service account for managing an app account | |
update_app_service_account | update | id, subdomain | Updates an existing app service account specified by ID | |
delete_app_service_account | delete | id, subdomain | Deletes an app service account specified by ID |
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 |
|---|---|---|
id | string | ID of an existing service account |
subdomain | string | (default: my-org) |
after | string | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination and Link header. |
limit | integer | A limit on the number of objects to return |
match | string | Searches for app service accounts where the account name (name), username (username), app instance label (containerInstanceName), or OIN app key name (containerGlobalName) contains the given value |
SELECT examples​
- get_app_service_account
- list_app_service_accounts
Retrieves an app service account specified by ID
SELECT
id,
name,
containerGlobalName,
containerInstanceName,
containerOrn,
created,
description,
lastUpdated,
ownerGroupIds,
ownerUserIds,
password,
status,
statusDetail,
username
FROM okta.privileged_access.service_accounts
WHERE id = '{{ id }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;
Lists all app service accounts
SELECT
id,
name,
containerGlobalName,
containerInstanceName,
containerOrn,
created,
description,
lastUpdated,
ownerGroupIds,
ownerUserIds,
password,
status,
statusDetail,
username
FROM okta.privileged_access.service_accounts
WHERE subdomain = '{{ subdomain }}' -- required
AND limit = '{{ limit }}'
AND after = '{{ after }}'
AND match = '{{ match }}'
;
INSERT examples​
- create_app_service_account
- Manifest
Creates a new app service account for managing an app account
INSERT INTO okta.privileged_access.service_accounts (
containerOrn,
description,
name,
ownerGroupIds,
ownerUserIds,
password,
username,
subdomain
)
SELECT
'{{ containerOrn }}' /* required */,
'{{ description }}',
'{{ name }}' /* required */,
'{{ ownerGroupIds }}',
'{{ ownerUserIds }}',
'{{ password }}' /* required */,
'{{ username }}' /* required */,
'{{ subdomain }}'
RETURNING
id,
name,
containerGlobalName,
containerInstanceName,
containerOrn,
created,
description,
lastUpdated,
ownerGroupIds,
ownerUserIds,
password,
status,
statusDetail,
username
;
# Description fields are for documentation purposes
- name: service_accounts
props:
- name: subdomain
value: "{{ subdomain }}"
description: Required parameter for the service_accounts resource.
- name: containerOrn
value: "{{ containerOrn }}"
description: |
The [ORN](https://developer.okta.com/docs/api/openapi/okta-management/guides/roles/#okta-resource-name-orn) of the relevant resource.
Use the specific app ORN format (`orn:{partition}:idp:{yourOrgId}:apps:{appType}:{appId}`) to identify an Okta app instance in your org.
- name: description
value: "{{ description }}"
description: |
The description of the app service account
- name: name
value: "{{ name }}"
description: |
The user-defined name for the app service account
- name: ownerGroupIds
value:
- "{{ ownerGroupIds }}"
description: |
A list of IDs of the Okta groups who own the app service account
- name: ownerUserIds
value:
- "{{ ownerUserIds }}"
description: |
A list of IDs of the Okta users who own the app service account
- name: password
value: "{{ password }}"
description: |
The app service account password
- name: username
value: "{{ username }}"
description: |
The username that serves as the direct link to your managed app account. Ensure that this value precisely matches the identifier of the target app account.
UPDATE examples​
- update_app_service_account
Updates an existing app service account specified by ID
UPDATE okta.privileged_access.service_accounts
SET
description = '{{ description }}',
name = '{{ name }}',
ownerGroupIds = '{{ ownerGroupIds }}',
ownerUserIds = '{{ ownerUserIds }}'
WHERE
id = '{{ id }}' --required
AND subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
containerGlobalName,
containerInstanceName,
containerOrn,
created,
description,
lastUpdated,
ownerGroupIds,
ownerUserIds,
password,
status,
statusDetail,
username;
DELETE examples​
- delete_app_service_account
Deletes an app service account specified by ID
DELETE FROM okta.privileged_access.service_accounts
WHERE id = '{{ id }}' --required
AND subdomain = '{{ subdomain }}' --required
;