# OKTA

## Introduction&#x20;

This document provides comprehensive and up-to-date instructions for integrating OKTA into Autom Mate. The integration enables users to perform identity and access management operations directly within Autom Mate workflows, such as retrieving users, groups, roles, and application assignments.&#x20;

Through this integration, Autom Mate users can automate identity tasks like user lookups, group membership checks, and role queries, all without writing any code.&#x20;

## What is OKTA?&#x20;

OKTA is a leading identity and access management platform that enables secure access to applications and data. It offers features such as single sign-on (SSO), user provisioning, directory integration, and multi-factor authentication.&#x20;

Organizations use OKTA to centralize and secure user identity, simplify access management, and streamline IT operations. With Autom Mate, OKTA becomes a programmable part of your workflow automation.&#x20;

Autom Mate Integration with OKTA&#x20;

Autom Mate provides several built-in actions under the OKTA integration, allowing seamless interaction with your OKTA environment. These actions include retrieving group members, listing users, viewing app assignments, and more.&#x20;

#### 🔐 Prerequisite&#x20;

Before using the OKTA integration in Autom Mate:&#x20;

1. Navigate to the [Vault](/userguide/product-features/management/vault.md) Page in Autom Mate (under the Management section).&#x20;
2. Create a Vault Credential:&#x20;
3. Go to the Application Credentials tab.&#x20;
4. Click “New App Credentials.”&#x20;
5. Search for or select “OKTA”.&#x20;
6. Fill Required Fields:&#x20;
7. Connector Name&#x20;
8. Authentication Type (e.g., API token)&#x20;
9. OKTA Domain URL&#x20;
10. API Token&#x20;
11. Test & Save
    1. Use “Test Connect” to validate the credentials.&#x20;
12. Click “Connect & Create” to save.&#x20;

## Using the Integration&#x20;

To use the OKTA integration in Autom Mate:&#x20;

1. Select a pre-built OKTA action (e.g., “Create a User” or “Manage User lifecycle”) from the Integration Library.&#x20;
2. Provide required inputs such as Username, Recovery Question, or User Lifecycle, depending on the action being used.&#x20;
3. Execute the action and apply logic or next steps using the results.&#x20;

## How to Use Actions&#x20;

### Create a User&#x20;

#### Description and Purpose&#x20;

The OKTA - Create a User action allows Autom Mate users to create a new user account in their OKTA environment. This is useful for automated user provisioning scenarios, such as onboarding employees or setting up new external users. The action supports required identity fields as well as optional security and group assignment settings.&#x20;

#### Usage Instructions&#x20;

{% stepper %}
{% step %}
Select App Credential&#x20;

App Credential (Required): Select the credential that connects Autom Mate to OKTA. \
Example: OKTA\_Credential&#x20;
{% endstep %}

{% step %}
Provide Username&#x20;

Username (Required): Enter the unique username for the new user. \
Example: john.doe&#x20;

This will be used as the login identifier.&#x20;
{% endstep %}

{% step %}
Provide Email&#x20;

Email (Required): Enter the email address of the new user. \
Example: <john.doe@example.com>&#x20;

This should match the user’s actual contact email address.&#x20;
{% endstep %}

{% step %}
Provide First Name&#x20;

First Name (Required): Enter the user's first name. \
Example: John&#x20;
{% endstep %}

{% step %}
Provide Last Name&#x20;

Last Name (Required): Enter the user's last name. \
Example: Doe&#x20;
{% endstep %}

{% step %}
(Optional) Provide a Password&#x20;

Password: Define a secure password for the new user account. \
Example: StrongPassw0rd!&#x20;
{% endstep %}

{% step %}
(Optional) Provide a Recovery Question&#x20;

Recovery Question: Set a recovery question for password resets.  \
Example: What is your favorite book?&#x20;
{% endstep %}

{% step %}
(Optional) Provide a recovery Question Answer&#x20;

Recovery Question Answer:  Provide the answer to the recovery question. \
Example: The Great Gatsby&#x20;
{% endstep %}

{% step %}
(Optional) Provide Group IDs&#x20;

Group IDs: Provide one or more Group IDs in array format if the user should be added to specific OKTA groups. \
Example: \["00gr1abcd123", "00gr2efgh456"]&#x20;
{% endstep %}

{% step %}
Execute and Review&#x20;

Run the action. After execution, the selected variables will store the newly created OKTA user profile and metadata. You can use these variables in follow-up steps, such as assigning licenses, sending notifications, or triggering conditional logic based on the creation status.&#x20;
{% endstep %}
{% endstepper %}

#### Inputs&#x20;

<table data-header-hidden><thead><tr><th width="205"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>App Credential </td><td>Select the credential for connecting to OKTA (e.g. OKTA_Credential). </td></tr><tr><td>Username </td><td>Unique username for the user. (e.g.  John.Doe ). </td></tr><tr><td>Email </td><td>Email address of the user (e.g. john.doe@example.com). </td></tr><tr><td>First Name </td><td>User's first name (e.g. John). </td></tr><tr><td>Last Name </td><td>User's last name. (e.g. Doe) </td></tr><tr><td>Password </td><td>(Optional) Password to assign to the user (e.g. StrongPassw0rd!). </td></tr><tr><td>Recovery Question </td><td>(Optional) Question used for password recovery (e.g. What is your favorite book?). </td></tr><tr><td>Recovery Question Answer </td><td>(Optional) Answer to the recovery question (e.g. The Great Gatsby). </td></tr><tr><td>Group IDs </td><td>(Optional) List of group IDs to assign the user to (e.g. 00gr1abcd123). </td></tr></tbody></table>

Outputs&#x20;

<table data-header-hidden><thead><tr><th width="205"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>Output Body </td><td>Contains the full user data returned after account creation. </td></tr><tr><td>Output Header </td><td>Contains metadata such as HTTP status code and response messages. </td></tr></tbody></table>

&#x20;

### Get Password Reset Link&#x20;

#### Description and Purpose&#x20;

The OKTA Get Password Reset Link action allows Autom Mate users to generate a password reset link for a specified user in their OKTA environment. This action is useful in user support workflows such as password recovery or temporary access restoration. It offers options to notify the user by email and revoke existing sessions if necessary.&#x20;

#### Usage Instructions&#x20;

{% stepper %}
{% step %}
Select App Credential&#x20;

App Credential (Required): Select the credential that connects Autom Mate to OKTA. \
Example: OKTA\_Credential \
This credential enables secure interaction with your OKTA tenant.&#x20;
{% endstep %}

{% step %}
Provide User Login&#x20;

User Login (Required): Enter the username (login) of the user who needs a password reset link. \
Example: jane.doe \
This value identifies the target user in OKTA.&#x20;
{% endstep %}

{% step %}
Decide Whether to Send Email&#x20;

Send Email? (Required): Choose whether the reset link should be sent to the user via email. \
Example: Yes \
Set to Yes to automatically email the reset link, or No if you intend to send it through another channel.&#x20;
{% endstep %}

{% step %}
(Optional) Revoke User Sessions&#x20;

Revoke Sessions of the User: \
Choose whether to revoke all active sessions for the user. \
Example: Yes \
This ensures that the user must re-authenticate with a new password.&#x20;
{% endstep %}

{% step %}
Execute and Review&#x20;

Run the action. After execution, the selected variables will store the password reset link and response metadata. You can use the reset link in follow-up steps, such as notifications or audits. <br>
{% endstep %}
{% endstepper %}

#### Inputs&#x20;

<table data-header-hidden><thead><tr><th width="244"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>User Login </td><td>Username of the user who should receive a reset link (e.g. jane.doe). </td></tr><tr><td>Send Email? </td><td>Choose whether to send the link via email (e.g. Yes). </td></tr><tr><td>Revoke Sessions of the User </td><td>Choose whether to revoke all current sessions (e.g. Yes). </td></tr></tbody></table>

&#x20;

Outputs&#x20;

<table data-header-hidden><thead><tr><th width="245"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>Output Body </td><td>Contains the password reset link and related user data. </td></tr><tr><td>Output Header </td><td>Contains HTTP metadata such as status code and headers. </td></tr></tbody></table>

&#x20;

### Manage User Lifecycle&#x20;

#### Description and Purpose&#x20;

The OKTA – Manage User Lifecycle action allows Autom Mate users to change the lifecycle state of a user within their OKTA environment. This includes operations such as activating, deactivating, suspending, or unsuspending a user. It is especially useful for automated employee onboarding, offboarding, or access control procedures.&#x20;

#### Usage Instructions&#x20;

{% stepper %}
{% step %}
Select App Credential&#x20;

App Credential (Required): Select the credential that connects Autom Mate to OKTA. \
Example: OKTA\_Credential \
This credential enables secure communication with the OKTA instance.&#x20;
{% endstep %}

{% step %}
Provide User Login&#x20;

User Login (Required): Enter the login (username) of the user whose lifecycle state you want to manage. \
Example: john.doe \
This identifies the user in OKTA.&#x20;
{% endstep %}

{% step %}
Define Lifecycle Event&#x20;

User Lifecycle (Required): Specify the lifecycle event to perform, such as activate, deactivate, suspend, or unsuspend. \
Example: deactivate \
This determines the lifecycle transition for the specified user.&#x20;
{% endstep %}

{% step %}
Execute and Review&#x20;

Run the action. The result will be stored in the selected output variables. Use these outputs to validate the lifecycle change or take additional automated steps such as logging, alerting, or auditing.&#x20;
{% endstep %}
{% endstepper %}

#### Inputs&#x20;

<table data-header-hidden><thead><tr><th width="171"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>App Credential </td><td>Select the credential for connecting to OKTA (e.g. OKTA_Credential). </td></tr><tr><td>User Login </td><td>Login name of the target user (e.g. john.doe). </td></tr><tr><td>User Lifecycle </td><td>Lifecycle event to perform (e.g. deactivate). </td></tr></tbody></table>

#### Outputs&#x20;

<table data-header-hidden><thead><tr><th width="171"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>Output Body </td><td>Contains the OKTA response confirming the lifecycle change. </td></tr><tr><td>Output Header </td><td>Contains metadata such as HTTP status code and headers. </td></tr></tbody></table>

### View All Groups&#x20;

#### Description and Purpose&#x20;

The OKTA – View All Groups action allows Autom Mate users to retrieve a complete list of groups configured within their OKTA environment. This is useful for administrative and governance tasks, such as managing group assignments, performing audits, or dynamically referencing group IDs in automated workflows.&#x20;

#### Usage Instructions&#x20;

{% stepper %}
{% step %}
Select App Credential&#x20;

App Credential (Required): Select the credential that connects Autom Mate to OKTA. \
Example: OKTA\_Credential \
This credential enables authorized access to group data within your OKTA environment.&#x20;
{% endstep %}

{% step %}
Execute and Review&#x20;

Run the action. The output will contain the full list of groups available in your OKTA tenant, which can be used in further automation steps like user-to-group mapping, reporting, or configuration.&#x20;
{% endstep %}
{% endstepper %}

#### Inputs&#x20;

<table data-header-hidden><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>App Credential </td><td>Select the credential for connecting to OKTA (e.g. OKTA_Credential). </td></tr></tbody></table>

#### Outputs&#x20;

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>Output Body </td><td>Contains the full list of groups retrieved from OKTA. </td></tr><tr><td>Output Header </td><td>Contains metadata such as HTTP status code and response headers. </td></tr></tbody></table>

&#x20;

### View All Users&#x20;

#### Description and Purpose&#x20;

The OKTA – View All Users action allows Autom Mate users to retrieve a list of users from their OKTA environment. This can be used for audits, reporting, or dynamic user-based workflows. Optionally, the action supports filtered queries to narrow down results to specific users based on criteria such as email or status.&#x20;

#### Usage Instructions&#x20;

{% stepper %}
{% step %}
Select App Credential&#x20;

App Credential (Required): Select the credential that connects Autom Mate to OKTA. \
Example: OKTA\_Credential \
This credential enables secure access to the OKTA user directory.&#x20;
{% endstep %}

{% step %}
(Optional) Provide Filter&#x20;

Filter: Provide a query string to filter users (e.g., by email or attribute). \
Example: <q=test@autommate.com> \
This allows you to retrieve specific user records instead of all users.&#x20;
{% endstep %}

{% step %}
Execute and Review&#x20;

Run the action. The output body will include the retrieved user list. You can apply further logic to loop through users, assign roles, or log results.&#x20;
{% endstep %}
{% endstepper %}

#### Inputs&#x20;

<table data-header-hidden><thead><tr><th width="205"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>App Credential </td><td>Select the credential for connecting to OKTA (e.g. OKTA_Credential). </td></tr><tr><td>Filter </td><td>(Optional) Query to filter users (e.g. <a href="mailto:q=test@autommate.com">q=test@autommate.com</a>). </td></tr></tbody></table>

#### Outputs&#x20;

<table data-header-hidden><thead><tr><th width="205"></th><th></th></tr></thead><tbody><tr><td>Field </td><td>Description </td></tr><tr><td>Output Body </td><td>Contains the retrieved list of users from OKTA. </td></tr><tr><td>Output Header </td><td>Contains metadata such as HTTP status code and response headers. </td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/libraries/integration/okta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
