# Okta

[Okta](https://www.okta.com/) is an identity and access management service for web-based applications.

Torq enables quick and easy integration with Okta, so you can automate anything and everything within moments. Torq's public Okta steps include:

- List All Okta Users

- Add User to Group

- Enroll Okta SMS factor

- List User Assigned Roles

- +49 more...

If you don't see a step you need, you can [create your own](https://kb.torq.io/en/articles/9183207-creating-custom-steps-in-torq-automate-anything) in various ways, such as using the Send an HTTP Request step or Torq’s Step Builder, and share it across your organization.

To [trigger](https://kb.torq.io/en/articles/9130865-integration-triggers-in-torq-ingest-data) a Torq workflow based on events sent from Okta, look [here](#h_6dde3c652f).
​

To use Okta [steps](https://kb.torq.io/en/articles/9122841-explore-torq-steps-workflow-building-blocks) in Torq workflows, look [here](#h_bd9c733c11).

# **Use Okta to Trigger Workflows in Torq**

## **Step One: Create an Okta Trigger Integration in Torq**

1. **Navigate to Integration:** Go to **Build > Integrations > Triggers > Okta** and click **Add.**

2. **Fill in the Details:**

  1. Give the integration a unique and meaningful name.

  2. Optionally, add an authentication header.

    1. Give the secret a name.

    2. Click **Generate random secret**.

    3. Copy the secret name and the secret and save them for later. You will use this same header name and secret when creating your event hook in Okta.

3. **Finalize**: Click **Add.**

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1405977510/49032de0a71f3ac63da3174198e3/image.png?expires=1793573100&amp;signature=a384ec592c24180395c6571222d10952704fe789d32331b101ae9e39252b059b&amp;req=dSQnE8B5moReWfMW1HO4zQX8iTJd8YHE2LX8he1atxjcI3JXTLpHAcLAJsVH%0ALuTf%0A)

## **Step Two: Create an Event Hook in Okta**

1. **Go to Okta**: In Okta, click the **Admin** button at the top right of your home page to access your admin dashboard.

2. **Navigate to Event Hook:** Go to **Workflow > Event Hooks** and click **Create Event Hook**.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1405999559/17b03fa7b6e9517d3b1c0f0e22c2/image.png?expires=1793573100&amp;signature=36ecd7997c50cc90c6dcea4e66fd4c290b0e32b1347374636ce7047ce3a5e17b&amp;req=dSQnE8B3lIRaUPMW1HO4zd02YsdDTRpsNrOigYza535hfFXn%2BLNEokwUz36V%0AaXyH%0A)

3. **Fill in the Details:**

  1. **Name:** Give the Event Hook a meaningful name.

  2. **URL:** Paste the URL from the Okta integration you created in Torq from [step one](#h_d2931f1553).

  3. **Authentication field**: Paste the authentication header name you created earlier.

  4. **Authentication secret:** Paste the authentication header secret you created earlier.

  5. **Requests:** Add custom header fields and subscribe to one or more events to send to Torq.

4. **Finalize**: Click **Save & Continue.**

Now that you've successfully created an Okta trigger, you can build your first Okta-initiated workflow!

In Torq, go to **Build > Workflows > Create a Workflow > New Blank Workflow**, and select the trigger type: **Integrations > Okta**. Find your new trigger, and automate away!

# **Use Okta Steps in Torq**

## **Step One: Create an Okta API Token**

API tokens inherit the same permissions as the user who creates them, and if the user permissions change, the API token permissions also change. For more information about API tokens, see the [Okta documentation](https://developer.okta.com/docs/guides/create-an-api-token/main/#create-the-token).

1. **Sign in to Okta:** Sign in to your Okta account with administrator privileges.

2. **Create a Token**: Click **Security > API > Tokens > Create Token**.

3. **Fill in the Details:**

  1. Give the token a meaningful name

  2. Use the dropdown menu to select the relevant origin for API calls made with this token.

4. **Finalize:** Click **Create Token**.

5. **Save Token**: Copy the API token and save it to use later in Torq.

6. **Finalize:** Click **Ok, got it**.

  ![oktagif.gif](https://downloads.intercomcdn.com/i/o/eomhaz2o/1399502646/58b7eb243febb08a4afbb7fc91d4/oktagif.gif?expires=1793573100&amp;signature=6d0b6d9766ae1c2331468d78ce14f73c77fd40fbb796ee6b670d58e076051dae&amp;req=dSMuH8x%2Bn4dbX%2FMW1HO4zWHhPZ8HXtklwTJ75%2Bb%2FO3eDMIXzx624%2FIDk9Fkf%0A0s98%0A)

## **Step Two: Create an Okta Steps Integration in Torq**

1. **Navigate to Integration:** Go to **Build > Integrations > Steps > Okta** and click **Add**.

2. **Fill in the Details:**

  1. Give the integration a unique and meaningful name.

  2. In the **API Key** field, paste the API token that you saved in [step one](#h_1d44913452).

  3. In the **Okta Domain** field, paste the section of the URL from your company's Okta app (ex. my-company.okta.com).

3. **Test:** Click **[Test Integration](https://kb.torq.io/en/articles/10627995-testing-integration-instances-validate-your-connections)** to verify the integration is configured correctly.

  ![](https://downloads.intercomcdn.com/i/o/eomhaz2o/1406014648/274e7a3a37237fd773e2c553ae5f/image.png?expires=1793573100&amp;signature=6cf5aa167741916b6dd6b65af8518fa1c6e6add6c4e952e66cc69a79f2c758cf&amp;req=dSQnEMl%2FmYdbUfMW1HO4zUvaWo0pX9VN3XWPZcsUZdGnFe4LbxXvWiZ1qBns%0A0hjc%0A)

4. **Finalize:** Click **Add**.

# **FAQs**

- Okta may limit the number of event hooks you can create, which limits the number of trigger integrations you can set up within Torq. If you hit the event hook limit, [subscribe to all events](#h_04732321b1) in Okta and use [trigger conditions](https://kb.torq.io/en/articles/9130865-integration-triggers-in-torq-ingest-data#h_323a1c460a)within your workflows to specify when a workflow should be triggered.

# **Templates**

Now that you've added your integrations check out these specially crafted templates by Torq's security experts. Visit Torq's template library for [more](https://app.torq.io/templates?).

- [Find all Okta Active Users with Pagination](https://kb.torq.io/en/articles/9350045-find-all-okta-active-users-with-pagination-workflow-template)

- [Okta Exposed Passwords in Failed Login Attempts](https://kb.torq.io/en/articles/9350134-okta-exposed-passwords-in-failed-login-attempts-workflow-template)

- [Add Malicious IPs to Network Block Zone from Okta System Logs](https://kb.torq.io/en/articles/9349996-add-malicious-ips-to-network-block-zone-from-okta-system-logs-workflow-template)