Skip to content

Commit bd49a7e

Browse files
authored
fix(okta): describe each user param the way its endpoint accepts it (#7307)
Okta's Management API spec uses two distinct user path parameters. `pathId` ("An ID, login, or login shortname ... of an existing Okta user") backs `/api/v1/users/{id}` and every `/api/v1/users/{id}/lifecycle/*` operation. `pathUserId` and `pathAppUserId` ("ID of an existing Okta user") back the factors, roles, sessions, and membership paths. Every Okta `userId` param is `user-or-llm`, so its description is the only thing a model reads before choosing what to pass. Eight tools on `pathUserId` endpoints advertised "User ID or login", so a model that supplied an email got a 404; `delete_user` sits on a `pathId` endpoint but promised an ID only, so a model resolved an ID it never needed. Tightened: assign_user_role, list_user_roles, remove_user_role, enroll_factor, list_factors, get_factor, reset_factor, clear_user_sessions. Loosened: delete_user. A registry-derived test classifies each Okta tool by the path its own `url` builder produces, so a future tool is covered without a hardcoded list.
1 parent f3fb445 commit bd49a7e

12 files changed

Lines changed: 131 additions & 19 deletions

apps/docs/content/docs/integrations/okta.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Permanently delete a user from your Okta organization. Can only be performed on
300300
| --------- | ---- | -------- | ----------- |
301301
| `apiKey` | string | Yes | Okta API token for authentication |
302302
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
303-
| `userId` | string | Yes | User ID to delete |
303+
| `userId` | string | Yes | User ID or login \(email\) to delete |
304304
| `sendEmail` | boolean | No | Send deactivation email to admin \(default: false\) |
305305

306306
#### Output
@@ -690,7 +690,7 @@ List the MFA factors a user has enrolled, with each factor type, provider, and e
690690
| --------- | ---- | -------- | ----------- |
691691
| `apiKey` | string | Yes | Okta API token for authentication |
692692
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
693-
| `userId` | string | Yes | User ID or login to list enrolled factors for |
693+
| `userId` | string | Yes | Okta user ID \(not a login or email\) to list enrolled factors for |
694694

695695
#### Output
696696

@@ -718,7 +718,7 @@ Retrieve a single enrolled MFA factor for a user, including its type, provider,
718718
| --------- | ---- | -------- | ----------- |
719719
| `apiKey` | string | Yes | Okta API token for authentication |
720720
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
721-
| `userId` | string | Yes | User ID or login the factor belongs to |
721+
| `userId` | string | Yes | Okta user ID \(not a login or email\) the factor belongs to |
722722
| `factorId` | string | Yes | Factor ID to look up |
723723

724724
#### Output
@@ -745,7 +745,7 @@ Enroll an MFA factor for a user. The profile fields required depend on the facto
745745
| --------- | ---- | -------- | ----------- |
746746
| `apiKey` | string | Yes | Okta API token for authentication |
747747
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
748-
| `userId` | string | Yes | User ID or login to enroll the factor for |
748+
| `userId` | string | Yes | Okta user ID \(not a login or email\) to enroll the factor for |
749749
| `factorType` | string | Yes | Factor type to enroll \(sms, call, email, question, push, token:software:totp, u2f, webauthn\) |
750750
| `provider` | string | Yes | Factor provider \(OKTA, GOOGLE, FIDO, DUO, RSA, SYMANTEC, YUBICO, CUSTOM\). Each provider supports a subset of factor types |
751751
| `phoneNumber` | string | No | Phone number in E.164 format. Required for the sms and call factor types |
@@ -779,7 +779,7 @@ Unenroll one specific MFA factor for a user so they can re-enroll it. Destructiv
779779
| --------- | ---- | -------- | ----------- |
780780
| `apiKey` | string | Yes | Okta API token for authentication |
781781
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
782-
| `userId` | string | Yes | User ID or login the factor belongs to |
782+
| `userId` | string | Yes | Okta user ID \(not a login or email\) the factor belongs to |
783783
| `factorId` | string | Yes | Factor ID to unenroll |
784784
| `removeRecoveryEnrollment` | boolean | No | Also remove the phone number as a recovery method, not only as a factor. Applies to sms and call factors only \(default: false\) |
785785

@@ -822,7 +822,7 @@ Revoke every active Okta session for a user, signing them out of all devices imm
822822
| --------- | ---- | -------- | ----------- |
823823
| `apiKey` | string | Yes | Okta API token for authentication |
824824
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
825-
| `userId` | string | Yes | User ID or login whose sessions will be revoked |
825+
| `userId` | string | Yes | Okta user ID \(not a login or email\) whose sessions will be revoked |
826826
| `oauthTokens` | boolean | No | Also revoke the user OpenID Connect and OAuth refresh and access tokens \(default: false\) |
827827
| `forgetDevices` | boolean | No | Clear the user remembered factors for all devices \(default: true\) |
828828

@@ -1136,7 +1136,7 @@ List the administrator roles assigned to a user. Returns both standard roles and
11361136
| --------- | ---- | -------- | ----------- |
11371137
| `apiKey` | string | Yes | Okta API token for authentication |
11381138
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
1139-
| `userId` | string | Yes | User ID or login to list admin roles for |
1139+
| `userId` | string | Yes | Okta user ID \(not a login or email\) to list admin roles for |
11401140

11411141
#### Output
11421142

@@ -1165,7 +1165,7 @@ Grant a user an administrator role. Use a standard role type such as USER_ADMIN
11651165
| --------- | ---- | -------- | ----------- |
11661166
| `apiKey` | string | Yes | Okta API token for authentication |
11671167
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
1168-
| `userId` | string | Yes | User ID or login to assign the admin role to |
1168+
| `userId` | string | Yes | Okta user ID \(not a login or email\) to assign the admin role to |
11691169
| `roleType` | string | Yes | Role type to assign: SUPER_ADMIN, ORG_ADMIN, APP_ADMIN, USER_ADMIN, HELP_DESK_ADMIN, READ_ONLY_ADMIN, API_ACCESS_MANAGEMENT_ADMIN, GROUP_MEMBERSHIP_ADMIN, REPORT_ADMIN, WORKFLOWS_ADMIN, ACCESS_CERTIFICATIONS_ADMIN, ACCESS_REQUESTS_ADMIN, or CUSTOM |
11701170
| `customRoleId` | string | No | Custom role ID. Required when the role type is CUSTOM |
11711171
| `resourceSetId` | string | No | Resource set ID the custom role applies to. Required when the role type is CUSTOM |
@@ -1197,7 +1197,7 @@ Revoke an administrator role from a user. Destructive: the user immediately lose
11971197
| --------- | ---- | -------- | ----------- |
11981198
| `apiKey` | string | Yes | Okta API token for authentication |
11991199
| `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) |
1200-
| `userId` | string | Yes | User ID or login to revoke the admin role from |
1200+
| `userId` | string | Yes | Okta user ID \(not a login or email\) to revoke the admin role from |
12011201
| `roleAssignmentId` | string | Yes | Role assignment ID to revoke, as returned by List User Roles. For a custom role this is the resource set binding ID |
12021202

12031203
#### Output

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/okta/assign_user_role.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const oktaAssignUserRoleTool: ToolConfig<
3737
type: 'string',
3838
required: true,
3939
visibility: 'user-or-llm',
40-
description: 'User ID or login to assign the admin role to',
40+
description: 'Okta user ID (not a login or email) to assign the admin role to',
4141
},
4242
roleType: {
4343
type: 'string',

apps/sim/tools/okta/clear_user_sessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const oktaClearUserSessionsTool: ToolConfig<
3333
type: 'string',
3434
required: true,
3535
visibility: 'user-or-llm',
36-
description: 'User ID or login whose sessions will be revoked',
36+
description: 'Okta user ID (not a login or email) whose sessions will be revoked',
3737
},
3838
oauthTokens: {
3939
type: 'boolean',

apps/sim/tools/okta/delete_user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const oktaDeleteUserTool: ToolConfig<OktaDeleteUserParams, OktaDeleteUser
3030
type: 'string',
3131
required: true,
3232
visibility: 'user-or-llm',
33-
description: 'User ID to delete',
33+
description: 'User ID or login (email) to delete',
3434
},
3535
sendEmail: {
3636
type: 'boolean',

apps/sim/tools/okta/enroll_factor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const oktaEnrollFactorTool: ToolConfig<OktaEnrollFactorParams, OktaEnroll
3434
type: 'string',
3535
required: true,
3636
visibility: 'user-or-llm',
37-
description: 'User ID or login to enroll the factor for',
37+
description: 'Okta user ID (not a login or email) to enroll the factor for',
3838
},
3939
factorType: {
4040
type: 'string',

apps/sim/tools/okta/get_factor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const oktaGetFactorTool: ToolConfig<OktaGetFactorParams, OktaGetFactorRes
3030
type: 'string',
3131
required: true,
3232
visibility: 'user-or-llm',
33-
description: 'User ID or login the factor belongs to',
33+
description: 'Okta user ID (not a login or email) the factor belongs to',
3434
},
3535
factorId: {
3636
type: 'string',

apps/sim/tools/okta/list_factors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const oktaListFactorsTool: ToolConfig<OktaListFactorsParams, OktaListFact
3030
type: 'string',
3131
required: true,
3232
visibility: 'user-or-llm',
33-
description: 'User ID or login to list enrolled factors for',
33+
description: 'Okta user ID (not a login or email) to list enrolled factors for',
3434
},
3535
},
3636

apps/sim/tools/okta/list_user_roles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const oktaListUserRolesTool: ToolConfig<OktaListUserRolesParams, OktaList
3535
type: 'string',
3636
required: true,
3737
visibility: 'user-or-llm',
38-
description: 'User ID or login to list admin roles for',
38+
description: 'Okta user ID (not a login or email) to list admin roles for',
3939
},
4040
},
4141

apps/sim/tools/okta/remove_user_role.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const oktaRemoveUserRoleTool: ToolConfig<
3333
type: 'string',
3434
required: true,
3535
visibility: 'user-or-llm',
36-
description: 'User ID or login to revoke the admin role from',
36+
description: 'Okta user ID (not a login or email) to revoke the admin role from',
3737
},
3838
roleAssignmentId: {
3939
type: 'string',

0 commit comments

Comments
 (0)