> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/okta.md).

# Okta

Connect to Okta to provision and manage users and groups, reset passwords, and audit application assignments from your AI workflows.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector | Authentication |
| --------- | -------------- |
| Okta      | API token      |

#### Okta

Connect to Okta with an SSWS API token to manage users and groups, reset passwords, and audit application assignments. The token inherits the creating admin's permissions.

**Set up in Okta**

1. Prepare the Okta account or service that the workflow will access. Grant access to the required resources and operations.
2. **API token:** An SSWS API token, created in the Okta Admin Console under Security > API > Tokens. The token inherits the creating admin's permissions, so create it with an admin account that has the roles this workflow needs (e.g. User Administrator, Group Administrator).

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **Okta**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required | What to enter                                                                                                                                                                                                                                                                                                                                            |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Okta domain   | Yes      | Your Okta org host, e.g. 'acme.okta.com', or a custom domain. A bare host or a full 'https\://...' URL are both accepted.                                                                                                                                                                                                                                |
| API token     | Yes      | An SSWS API token, created in the Okta Admin Console under Security > API > Tokens. The token inherits the creating admin's permissions, so create it with an admin account that has the roles this workflow needs (e.g. User Administrator, Group Administrator). [Provider instructions](https://help.okta.com/en-us/content/topics/security/api.htm). |

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **Okta** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Create User

Provision a new user account in your Okta org. By default Okta emails the person an activation link to set their own password.

**Inputs**

| Field                | Type    | Required | Description                                                                                                                                        |
| -------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| First name           | string  | Yes      | The user's given name.                                                                                                                             |
| Last name            | string  | Yes      | The user's family name.                                                                                                                            |
| Email                | string  | Yes      | The user's primary email address.                                                                                                                  |
| Username             | string  | No       | Okta sign-in username. Okta requires email format by default. Leave blank to use the email address; use another format only if this org allows it. |
| Mobile phone         | string  | No       | Optional mobile phone number.                                                                                                                      |
| Activate immediately | boolean | No       | Send the activation email and make the account usable right away. Turn off to create a staged account with no email. Default: true.                |

**Outputs**

| Field      | Type   | Description                       |
| ---------- | ------ | --------------------------------- |
| User ID    | string | The new user's Okta id.           |
| Status     | string | Lifecycle status of the new user. |
| Email      | string | The user's email.                 |
| Username   | string | The user's Okta username.         |
| Created at | string | When the account was created.     |

#### List Users

Browse users in your Okta directory, optionally filtered by a name or email search.

**Inputs**

| Field           | Type    | Required | Description                                               |
| --------------- | ------- | -------- | --------------------------------------------------------- |
| Search          | string  | No       | Filter by the start of a first name, last name, or email. |
| Max results     | integer | No       | Maximum number of users to return. Minimum: 1.            |
| Advanced filter | string  | No       | Advanced Okta search expression for power users.          |
| Page cursor     | string  | No       | Continue from a previous page of results.                 |

**Outputs**

| Field            | Type          | Description                            |
| ---------------- | ------------- | -------------------------------------- |
| Users            | object\_array | The matching users.                    |
| Next page cursor | string        | Cursor to fetch the next page, if any. |

#### Find User by Email

Look up a single Okta user by their exact email address.

**Inputs**

| Field | Type   | Required | Description                         |
| ----- | ------ | -------- | ----------------------------------- |
| Email | string | Yes      | The exact email address to look up. |

**Outputs**

| Field      | Type    | Description                          |
| ---------- | ------- | ------------------------------------ |
| Found      | boolean | Whether a matching user exists.      |
| User ID    | string  | The matched user's Okta id.          |
| Status     | string  | The matched user's lifecycle status. |
| First name | string  | The matched user's first name.       |
| Last name  | string  | The matched user's last name.        |
| Username   | string  | The matched user's Okta username.    |

#### Deactivate User

Deactivate a user and deprovision them from all assigned apps. This is destructive: deprovisioning can permanently delete the user's data in downstream apps (email, files) and cannot be undone. Common for offboarding.

**Inputs**

| Field                         | Type            | Required | Description                                                           |
| ----------------------------- | --------------- | -------- | --------------------------------------------------------------------- |
| User                          | select (string) | Yes      | The user to deactivate. Options load from the selected connection.    |
| Notify administrator by email | boolean         | No       | Email the administrator when the user is deactivated. Default: false. |

**Outputs**

| Field   | Type    | Description                     |
| ------- | ------- | ------------------------------- |
| User ID | string  | The deactivated user's id.      |
| Success | boolean | Whether deactivation succeeded. |

#### Suspend User

Temporarily suspend an active user so they cannot sign in, without losing their profile or app assignments. Reversible.

**Inputs**

| Field | Type            | Required | Description                                                            |
| ----- | --------------- | -------- | ---------------------------------------------------------------------- |
| User  | select (string) | Yes      | The active user to suspend. Options load from the selected connection. |

**Outputs**

| Field   | Type    | Description                   |
| ------- | ------- | ----------------------------- |
| User ID | string  | The suspended user's id.      |
| Success | boolean | Whether suspension succeeded. |

#### Reset Password

Start a password reset for a user. Okta can email them a reset link, or return a one-time reset URL you can deliver yourself. This moves the user to RECOVERY status and prevents sign-in until they complete the reset flow.

**Inputs**

| Field                    | Type            | Required | Description                                                                                                          |
| ------------------------ | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
| User                     | select (string) | Yes      | The user whose password to reset. Options load from the selected connection.                                         |
| Email the reset link     | boolean         | No       | Let Okta email the user a reset link. Turn off to receive a one-time reset URL in the output instead. Default: true. |
| Sign out active sessions | boolean         | No       | Also end the user's current sign-in sessions. Default: false.                                                        |

**Outputs**

| Field     | Type    | Description                                                             |
| --------- | ------- | ----------------------------------------------------------------------- |
| User ID   | string  | The user whose password was reset.                                      |
| Reset URL | string  | One-time password reset link, present only when the email was not sent. |
| Success   | boolean | Whether the reset was initiated.                                        |

#### List Groups

Browse groups in your Okta org, optionally filtered by a name search.

**Inputs**

| Field       | Type    | Required | Description                                                   |
| ----------- | ------- | -------- | ------------------------------------------------------------- |
| Name search | string  | No       | Filter by the start of a group name.                          |
| Max results | integer | No       | Maximum number of groups to return. Minimum: 1. Default: 200. |
| Page cursor | string  | No       | Continue from a previous page of results.                     |

**Outputs**

| Field            | Type          | Description                            |
| ---------------- | ------------- | -------------------------------------- |
| Groups           | object\_array | The matching groups.                   |
| Next page cursor | string        | Cursor to fetch the next page, if any. |

#### Create Group

Create a new Okta group that users can be added to for access management.

**Inputs**

| Field       | Type   | Required | Description                                  |
| ----------- | ------ | -------- | -------------------------------------------- |
| Group name  | string | Yes      | The name of the new group.                   |
| Description | string | No       | Optional description of the group's purpose. |

**Outputs**

| Field       | Type   | Description                 |
| ----------- | ------ | --------------------------- |
| Group ID    | string | The new group's Okta id.    |
| Group name  | string | The group's name.           |
| Description | string | The group's description.    |
| Created at  | string | When the group was created. |

#### Find Group by Name

Look up a single Okta group by its exact name.

**Inputs**

| Field      | Type   | Required | Description                      |
| ---------- | ------ | -------- | -------------------------------- |
| Group name | string | Yes      | The exact group name to look up. |

**Outputs**

| Field       | Type    | Description                            |
| ----------- | ------- | -------------------------------------- |
| Found       | boolean | Whether a group with this name exists. |
| Group ID    | string  | The matched group's Okta id.           |
| Group name  | string  | The matched group's name.              |
| Description | string  | The matched group's description.       |

#### Add User to Group

Add a user to a group, granting the access that group membership provides.

**Inputs**

| Field | Type            | Required | Description                                                              |
| ----- | --------------- | -------- | ------------------------------------------------------------------------ |
| Group | select (string) | Yes      | The group to add the user to. Options load from the selected connection. |
| User  | select (string) | Yes      | The user to add. Options load from the selected connection.              |

**Outputs**

| Field    | Type    | Description                       |
| -------- | ------- | --------------------------------- |
| Success  | boolean | Whether the user is now a member. |
| Group ID | string  | The group id.                     |
| User ID  | string  | The user id.                      |

#### Remove User from Group

Remove a user from a group, revoking the access that membership provided.

**Inputs**

| Field | Type            | Required | Description                                                                            |
| ----- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| Group | select (string) | Yes      | The group to remove the user from. Options load from the selected connection.          |
| User  | select (string) | Yes      | The user to remove from the selected group. Options load from the selected connection. |

**Outputs**

| Field    | Type    | Description                   |
| -------- | ------- | ----------------------------- |
| Success  | boolean | Whether the user was removed. |
| Group ID | string  | The group id.                 |
| User ID  | string  | The user id.                  |

#### List Applications

Browse the applications configured in your Okta org.

**Inputs**

| Field       | Type    | Required | Description                                   |
| ----------- | ------- | -------- | --------------------------------------------- |
| Name search | string  | No       | Filter by the start of an app name or label.  |
| Max results | integer | No       | Maximum number of apps to return. Minimum: 1. |
| Page cursor | string  | No       | Continue from a previous page of results.     |

**Outputs**

| Field            | Type          | Description                            |
| ---------------- | ------------- | -------------------------------------- |
| Applications     | object\_array | The matching applications.             |
| Next page cursor | string        | Cursor to fetch the next page, if any. |

#### List User App Assignments

See a user's direct and group-derived application assignments, including provisioning status, for access reviews and troubleshooting.

**Inputs**

| Field       | Type            | Required | Description                                                                        |
| ----------- | --------------- | -------- | ---------------------------------------------------------------------------------- |
| User        | select (string) | Yes      | The user whose app assignments to list. Options load from the selected connection. |
| Max results | integer         | No       | Maximum number of application assignments to return. Minimum: 1.                   |
| Page cursor | string          | No       | Continue from a previous page of assignments.                                      |

**Outputs**

| Field            | Type          | Description                               |
| ---------------- | ------------- | ----------------------------------------- |
| Applications     | object\_array | The applications the user is assigned to. |
| Next page cursor | string        | Cursor to fetch the next page, if any.    |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/okta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
