Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/docs/content/docs/en/integrations/okta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Integrate Okta identity management into your workflow. Manage users, groups, and

### List Users from Okta

List all users in your Okta organization with optional search and filtering
List users in your Okta organization with optional search and filtering. Users with a DEPROVISIONED status are omitted unless a search or filter expression selects them.

#### Input

Expand Down Expand Up @@ -308,7 +308,7 @@ Permanently delete a user from your Okta organization. Can only be performed on
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `userId` | string | Deleted user ID |
| `deleted` | boolean | Whether the user was deleted |
| `deleted` | boolean | Whether the delete request was accepted. An ACTIVE user is deactivated by the first call and needs a second call to actually be deleted. |
| `success` | boolean | Operation success status |

### List Groups from Okta
Expand Down Expand Up @@ -396,7 +396,7 @@ Create a new group in your Okta organization

### Update Group in Okta

Update a group profile in your Okta organization. Only groups of OKTA_GROUP type can be updated. All profile properties must be specified (full replacement).
Update a group profile in your Okta organization. Only groups of OKTA_GROUP type can be updated. Fields left blank keep their stored value.

#### Input

Expand Down Expand Up @@ -552,7 +552,7 @@ List the group rules in your Okta organization. Each rule assigns users to group
| ↳ `expressionType` | string | Expression language, typically urn:okta:expression:1.0 |
| ↳ `assignUserToGroupIds` | array | Groups that matching users are assigned to |
| ↳ `excludedUserIds` | array | Users excluded from the rule |
| ↳ `excludedGroupIds` | array | Groups excluded from the rule |
| ↳ `excludedGroupIds` | array | Groups excluded from the rule. Always empty — Okta does not currently support group exclusions. |
| `count` | number | Number of rules returned |
| `nextCursor` | string | Cursor for the next page, or null on the last page |
| `hasMore` | boolean | Whether more rules are available |
Expand Down Expand Up @@ -584,7 +584,7 @@ Retrieve a single Okta group rule by ID, including the expression that decides w
| `expressionType` | string | Expression language, typically urn:okta:expression:1.0 |
| `assignUserToGroupIds` | array | Groups that matching users are assigned to |
| `excludedUserIds` | array | Users excluded from the rule |
| `excludedGroupIds` | array | Groups excluded from the rule |
| `excludedGroupIds` | array | Groups excluded from the rule. Always empty — Okta does not currently support group exclusions. |
| `success` | boolean | Operation success status |

### Create Group Rule in Okta
Expand Down Expand Up @@ -616,7 +616,7 @@ Create a group rule that automatically assigns users matching an Okta expression
| `expressionType` | string | Expression language, typically urn:okta:expression:1.0 |
| `assignUserToGroupIds` | array | Groups that matching users are assigned to |
| `excludedUserIds` | array | Users excluded from the rule |
| `excludedGroupIds` | array | Groups excluded from the rule |
| `excludedGroupIds` | array | Groups excluded from the rule. Always empty — Okta does not currently support group exclusions. |
| `success` | boolean | Operation success status |

### Activate Group Rule in Okta
Expand Down Expand Up @@ -677,7 +677,7 @@ Permanently delete a group rule. Destructive and irreversible. Optionally also r
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `groupRuleId` | string | Deleted group rule ID |
| `deleted` | boolean | Whether the rule was deleted |
| `deleted` | boolean | Whether the deletion was accepted. Okta answers 202 and removes the rule asynchronously. |
| `success` | boolean | Operation success status |

### List Factors from Okta
Expand Down
84 changes: 72 additions & 12 deletions apps/sim/blocks/blocks/okta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ function toFiniteNumber(value: unknown): number | undefined {
return Number.isFinite(parsed) ? parsed : undefined
}

/** Operations where Okta sends the notification email unless told otherwise. */
const SEND_EMAIL_DEFAULT_ON_OPERATIONS = ['okta_activate_user', 'okta_reset_password']

const SEND_EMAIL_DEFAULT_ON = new Set(SEND_EMAIL_DEFAULT_ON_OPERATIONS)

/** Treats a blank subBlock value as absent. */
function blankToUndefined(value: unknown): unknown {
return value === null || value === '' ? undefined : value
Expand Down Expand Up @@ -157,7 +162,7 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
],
okta_list_group_rules: [
'List group rules',
{ text: ', matching', field: 'search' },
{ text: ', matching', field: 'ruleSearch' },
{ text: ', up to', field: 'limit' },
],
okta_get_group_rule: [{ text: 'Read group rule', field: 'groupRuleId', core: true }],
Expand Down Expand Up @@ -252,7 +257,7 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
placeholder: 'profile.firstName eq "John"',
condition: {
field: 'operation',
value: ['okta_list_users', 'okta_list_groups', 'okta_list_group_rules'],
value: ['okta_list_users', 'okta_list_groups'],
},
wandConfig: {
enabled: true,
Expand Down Expand Up @@ -288,6 +293,19 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
value: ['okta_get_logs', 'okta_list_apps', 'okta_list_app_users', 'okta_list_app_groups'],
},
},
{
/**
* Group rules take a plain keyword on `search`, not the SCIM-style
* expression the Search field's wand generates, so they get their own
* field rather than sharing one that would produce a silently
* non-matching query.
*/
id: 'ruleSearch',
title: 'Search',
type: 'short-input',
placeholder: 'Keyword to search rules for',
condition: { field: 'operation', value: 'okta_list_group_rules' },
},
// User ID (shared across user operations that need it)
{
id: 'userId',
Expand Down Expand Up @@ -469,20 +487,30 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
placeholder: 'Description for the group',
condition: { field: 'operation', value: ['okta_create_group', 'okta_update_group'] },
},
// Send email option (activate, reset password, delete)
/**
* Okta's `sendEmail` default is not uniform: activation and password reset
* default to sending, deactivation and removal default to not sending. One
* shared switch could only be seeded for one of those, so the two groups get
* their own field and the params mapper picks by operation.
*/
{
id: 'sendEmail',
title: 'Send Email',
type: 'switch',
value: () => 'true',
condition: {
field: 'operation',
value: [
'okta_activate_user',
'okta_deactivate_user',
'okta_reset_password',
'okta_delete_user',
'okta_remove_user_from_app',
],
value: SEND_EMAIL_DEFAULT_ON_OPERATIONS,
},
mode: 'advanced',
},
{
id: 'sendDeactivationEmail',
title: 'Send Email',
type: 'switch',
condition: {
field: 'operation',
value: ['okta_deactivate_user', 'okta_delete_user', 'okta_remove_user_from_app'],
},
mode: 'advanced',
},
Expand Down Expand Up @@ -658,6 +686,11 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
id: 'forgetDevices',
title: 'Forget Devices',
type: 'switch',
/**
* Okta defaults this to true, so an unseeded switch would render off while
* remembered factors were in fact being cleared.
*/
value: () => 'true',
condition: { field: 'operation', value: 'okta_clear_user_sessions' },
mode: 'advanced',
},
Expand Down Expand Up @@ -945,9 +978,23 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
domain: params.domain,
limit: toFiniteNumber(params.limit),
priority: toFiniteNumber(params.priority),
// Group-specific UI fields carry the tool's generic param names.
/** Group-specific UI fields carry the tool's generic param names. */
name: blankToUndefined(params.groupName),
description: blankToUndefined(params.groupDescription),
/** Group rules get their own keyword field but the same wire param. */
search:
params.operation === 'okta_list_group_rules'
? blankToUndefined(params.ruleSearch)
: blankToUndefined(params.search),
/**
* Keyed off the operation rather than `??`: both switches are advanced,
* and `shouldSerializeSubBlock` skips `condition` for advanced fields,
* so a stale value from a previously selected operation can still be
* present here.
*/
sendEmail: SEND_EMAIL_DEFAULT_ON.has(String(params.operation))
? blankToUndefined(params.sendEmail)
: blankToUndefined(params.sendDeactivationEmail),
}

const mappedKeys = new Set([
Expand All @@ -958,6 +1005,10 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
'priority',
'groupName',
'groupDescription',
'search',
'ruleSearch',
'sendEmail',
'sendDeactivationEmail',
])
for (const [key, value] of Object.entries(params)) {
if (!mappedKeys.has(key)) result[key] = blankToUndefined(value)
Expand All @@ -975,6 +1026,7 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
userId: { type: 'string', description: 'User ID or login' },
groupId: { type: 'string', description: 'Group ID' },
search: { type: 'string', description: 'Search expression' },
ruleSearch: { type: 'string', description: 'Keyword to search group rules for' },
filter: { type: 'string', description: 'Filter expression' },
limit: { type: 'number', description: 'Max results to return' },
firstName: { type: 'string', description: 'First name' },
Expand All @@ -989,6 +1041,10 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
groupName: { type: 'string', description: 'Group name' },
groupDescription: { type: 'string', description: 'Group description' },
sendEmail: { type: 'boolean', description: 'Whether to send email notification' },
sendDeactivationEmail: {
type: 'boolean',
description: 'Whether to send the deactivation or removal email notification',
},
q: { type: 'string', description: 'Keyword search query' },
after: { type: 'string', description: 'Cursor for the next page of results' },
since: { type: 'string', description: 'Start of the System Log time window' },
Expand Down Expand Up @@ -1137,7 +1193,11 @@ export const OktaBlock: BlockConfig<OktaResponse> = {
accessibility: { type: 'json', description: 'Application accessibility settings' },
assignUserToGroupIds: { type: 'json', description: 'Groups a rule assigns matching users to' },
excludedUserIds: { type: 'json', description: 'Users excluded from a group rule' },
excludedGroupIds: { type: 'json', description: 'Groups excluded from a group rule' },
excludedGroupIds: {
type: 'json',
description:
'Groups excluded from a group rule. Always empty — Okta does not currently support group exclusions.',
},
amr: { type: 'json', description: 'Authentication methods used to establish a session' },
features: { type: 'json', description: 'Provisioning features enabled on an application' },
label: { type: 'string', description: 'Application or role label' },
Expand Down
6 changes: 3 additions & 3 deletions apps/sim/lib/integrations/integrations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updatedAt": "2026-08-15",
"updatedAt": "2026-08-16",
"integrations": [
{
"type": "onepassword",
Expand Down Expand Up @@ -13731,7 +13731,7 @@
"operations": [
{
"name": "List Users",
"description": "List all users in your Okta organization with optional search and filtering"
"description": "List users in your Okta organization with optional search and filtering. Users with a DEPROVISIONED status are omitted unless a search or filter expression selects them."
},
{
"name": "Get User",
Expand Down Expand Up @@ -13783,7 +13783,7 @@
},
{
"name": "Update Group",
"description": "Update a group profile in your Okta organization. Only groups of OKTA_GROUP type can be updated. All profile properties must be specified (full replacement)."
"description": "Update a group profile in your Okta organization. Only groups of OKTA_GROUP type can be updated. Fields left blank keep their stored value."
},
{
"name": "Delete Group",
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/tools/generated/tool-metadata.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/sim/tools/generated/tool-outputs.ts

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion apps/sim/tools/okta/create_group_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ export const oktaCreateGroupRuleTool: ToolConfig<
},
excludedGroupIds: {
type: 'array',
description: 'Groups excluded from the rule',
description:
'Groups excluded from the rule. Always empty — Okta does not currently support group exclusions.',
items: { type: 'string', description: 'Group ID' },
},
success: { type: 'boolean', description: 'Operation success status' },
Expand Down
6 changes: 5 additions & 1 deletion apps/sim/tools/okta/delete_group_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export const oktaDeleteGroupRuleTool: ToolConfig<

outputs: {
groupRuleId: { type: 'string', description: 'Deleted group rule ID' },
deleted: { type: 'boolean', description: 'Whether the rule was deleted' },
deleted: {
type: 'boolean',
description:
'Whether the deletion was accepted. Okta answers 202 and removes the rule asynchronously.',
},
success: { type: 'boolean', description: 'Operation success status' },
},
}
6 changes: 5 additions & 1 deletion apps/sim/tools/okta/delete_user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ export const oktaDeleteUserTool: ToolConfig<OktaDeleteUserParams, OktaDeleteUser

outputs: {
userId: { type: 'string', description: 'Deleted user ID' },
deleted: { type: 'boolean', description: 'Whether the user was deleted' },
deleted: {
type: 'boolean',
description:
'Whether the delete request was accepted. An ACTIVE user is deactivated by the first call and needs a second call to actually be deleted.',
},
success: { type: 'boolean', description: 'Operation success status' },
},
}
3 changes: 2 additions & 1 deletion apps/sim/tools/okta/get_group_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export const oktaGetGroupRuleTool: ToolConfig<OktaGetGroupRuleParams, OktaGetGro
},
excludedGroupIds: {
type: 'array',
description: 'Groups excluded from the rule',
description:
'Groups excluded from the rule. Always empty — Okta does not currently support group exclusions.',
items: { type: 'string', description: 'Group ID' },
},
success: { type: 'boolean', description: 'Operation success status' },
Expand Down
5 changes: 4 additions & 1 deletion apps/sim/tools/okta/get_logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export const oktaGetLogsTool: ToolConfig<OktaGetLogsParams, OktaGetLogsResponse>
if (params.q) queryParams.append('q', params.q)
if (params.sortOrder) queryParams.append('sortOrder', params.sortOrder)
if (params.after) queryParams.append('after', params.after)
if (params.limit) queryParams.append('limit', params.limit.toString())
/** `0` is a documented limit on this endpoint, so it must not read as absent. */
if (params.limit !== undefined && params.limit !== null) {
queryParams.append('limit', params.limit.toString())
}

const queryString = queryParams.toString()
return queryString
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/tools/okta/list_group_rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export const oktaListGroupRulesTool: ToolConfig<
},
excludedGroupIds: {
type: 'array',
description: 'Groups excluded from the rule',
description:
'Groups excluded from the rule. Always empty — Okta does not currently support group exclusions.',
items: { type: 'string', description: 'Group ID' },
},
},
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/tools/okta/list_users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const logger = createLogger('OktaListUsers')
export const oktaListUsersTool: ToolConfig<OktaListUsersParams, OktaListUsersResponse> = {
id: 'okta_list_users',
name: 'List Users from Okta',
description: 'List all users in your Okta organization with optional search and filtering',
description:
'List users in your Okta organization with optional search and filtering. Users with a DEPROVISIONED status are omitted unless a search or filter expression selects them.',
version: '1.0.0',

params: {
Expand Down
Loading
Loading