Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Okta

Okta

Okta identity: list, search, create, suspend and deactivate users, list groups, group members and applications. Orgs on okta.com only.

10 actions API key 6 read3 write1 destructive Calls okta.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "okta" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Create userwriteokta.create_userCreate an Okta user without a password. With activate true (default) Okta sends an activation email; with false the user stays STAGED.
InputTypeDescription
first_namestringRequiredFirst name
last_namestringRequiredLast name
emailstringRequiredEmail address
loginstringRequiredLogin (usually the email address)
mobile_phonestringOptionalMobile phone number
activatebooleanOptionalActivate the user and send the activation email (default true)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.create_user",
  input: {
    "first_name": "<first_name>",
    "last_name": "<last_name>",
    "email": "<email>",
    "login": "<login>"
  },
});
Deactivate userdestructiveokta.deactivate_userDeactivate a user: removes their access and app assignments. A deactivated user can only be reactivated by an admin; deleting is a separate step.
InputTypeDescription
user_idstringRequiredOkta user ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.deactivate_user",
  input: {
    "user_id": "<user_id>"
  },
  confirm: true,
});
Get userreadokta.get_userGet one user by Okta user ID, login or email-style login: status, profile and last login.
InputTypeDescription
user_idstringRequiredOkta user ID (00u...) or login
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.get_user",
  input: {
    "user_id": "<user_id>"
  },
});
List applicationsreadokta.list_appsList the applications in the org, optionally those whose label starts with a text.
InputTypeDescription
qstringOptionalMatches the start of the app label
limitintegerOptionalApps to return (max 200)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.list_apps",
  input: {},
});
List group membersreadokta.list_group_membersList the users in a group.
InputTypeDescription
group_idstringRequiredGroup ID (00g...)
limitintegerOptionalUsers to return (max 1000)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.list_group_members",
  input: {
    "group_id": "<group_id>"
  },
});
List groupsreadokta.list_groupsList groups, optionally those whose name starts with a text.
InputTypeDescription
qstringOptionalMatches the start of the group name
limitintegerOptionalGroups to return (max 10000)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.list_groups",
  input: {},
});
List a user's groupsreadokta.list_user_groupsList the groups a user belongs to.
InputTypeDescription
user_idstringRequiredOkta user ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.list_user_groups",
  input: {
    "user_id": "<user_id>"
  },
});
List or search usersreadokta.list_usersList users, or find them with 'q' (matches name or email start), or 'search' (an expression such as profile.department eq "Engineering" or status eq "ACTIVE").
InputTypeDescription
qstringOptionalMatches the start of first name, last name or email
searchstringOptionalSearch expression, e.g. profile.department eq "Engineering"
limitintegerOptionalUsers to return (max 200)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.list_users",
  input: {},
});
Suspend userwriteokta.suspend_userSuspend an active user: they cannot sign in until unsuspended, but their data and assignments are kept.
InputTypeDescription
user_idstringRequiredOkta user ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.suspend_user",
  input: {
    "user_id": "<user_id>"
  },
});
Unsuspend userwriteokta.unsuspend_userReturn a suspended user to ACTIVE so they can sign in again.
InputTypeDescription
user_idstringRequiredOkta user ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "okta.unsuspend_user",
  input: {
    "user_id": "<user_id>"
  },
});