> This page is for Data Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Okta: Connect Source Orgs

Once an Okta org is connected and assigned to a backup policy, Eon backs up its users, groups, apps, and configuration.
That lets you restore a deleted or changed object later, instead of rebuilding it in Okta by hand.

This article explains how to connect an Okta source org by creating an app in Okta that gives Eon read access, and then entering the app's details in the Eon console.

## Connect a source org

In this procedure, you'll create an API Services app in Okta and connect the org to Eon with it.
Eon signs in to Okta with OAuth 2.0 client credentials and a signed JSON web token (JWT), so there's no client secret to copy.

You can connect a source org from the

SaaS applications

page in the Eon console.

#### Before you start

Before you connect an Okta source org, make sure:

* You can sign in to the Okta org as a Super Administrator.
  Only a Super Administrator can grant API scopes and admin roles to an app.

* The org's URL is on an Okta-owned domain: `.okta.com`, `.oktapreview.com`, `.okta-emea.com`, `.okta-gov.com`, `.oktagov.com`, or `.okta.mil`.
  Custom domains aren't supported.

* You can create a custom admin role in Okta named Eon Backup - View admin assignments, unless you use the Bash script, which creates it.
  A backup fails with an error if the app lacks this role, and Eon doesn't check for the role when you connect, so a connection can succeed and a later backup fail.

* To use Bash or Terraform, you have an Okta API token that you created while signed in as a Super Administrator, under **Security** → **API** → **Tokens**.
  Eon never receives the token.

* To use the Bash script, `bash`, `curl`, and `jq` are installed on the machine that runs it.

* To back up Okta Workflows, you can sign in to Okta Workflows as an Okta Super Administrator.

#### Enter the Okta org URL

1. On the SaaS applications page, select **New Connection**, then select **Connect Okta**.
   The **Connect Okta** wizard opens.

2. In **Organization URL**, enter the address your users sign in at, such as `https://acme.okta.com`.
   Don't enter the Admin Console address, which ends in `-admin`.
   Eon also accepts an address without `https://` or with a trailing slash.

3. Select **Continue**.

#### Generate the signing key

Eon generates the key pair and shows the public key (JWK); the private key never leaves the customer's Eon scanning account.

Select **Generate signing key**.
The wizard shows the **Public key (JWK)**.

Each wizard run generates a new key, so add to Okta the key that your current wizard shows.

#### Create the Okta app

Create an API Services app in Okta that signs in with the public key.
You can use a script, Terraform, or the [Manual procedure](#manual-procedure).
All three create the same app.
The wizard's **Bash** and **Terraform** options show the snippet filled in with your org URL and public key.

#### Bash

Copy the snippet from the wizard's **Bash** option and run it in a terminal, which downloads `okta_source.sh` and runs it with `--org-url` and `--jwk`.

The script creates the app, adds the public key, grants the read scopes and the `okta.workflows.invoke.manage` scope, assigns the Read-only Administrator role, and creates the custom role.
It asks for your API token with hidden input, or reads it from the `OKTA_API_TOKEN` environment variable, and it refuses a token passed as an argument.
You can run the script again: it finishes a run that stopped halfway, and a run on a finished app changes nothing.

#### Bash script options

| Option                 | Description                                                                                                           |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `--org-url`            | The org URL.                                                                                                          |
| `--jwk`                | The public key (JWK) from the wizard.                                                                                 |
| `--app-name`           | The app's name in Okta. The default is `Eon Backup`.                                                                  |
| `--dry-run`            | Reads the org and prints the changes the script would make, without making them. A dry run still needs the API token. |
| `--no-workflows-scope` | Leaves out the `okta.workflows.invoke.manage` scope, for an org that doesn't use Okta Workflows.                      |
| `--help`               | Lists the options, scopes, and admin role.                                                                            |

#### Terraform

Copy the configuration from the wizard's **Terraform** option into `main.tf` and apply it with `OKTA_API_TOKEN` set to your API token.

The Terraform module creates the app, adds the public key, grants the read scopes and the `okta.workflows.invoke.manage` scope, and assigns the Read-only Administrator role, but it doesn't create the custom role.
After you apply it, create the role with the **Grant read access to admin assignments** step of the [Manual procedure](#manual-procedure), or run the Bash script with the same app name and public key.

#### Terraform module inputs and outputs

The `okta/okta` provider, version `~> 7.0`, reads the API token from `OKTA_API_TOKEN`.
The `okta_source` module takes these inputs:

| Input                   | Description                                                                                                                                     |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `org_url`               | The org URL, such as `https://acme.okta.com`.                                                                                                   |
| `jwk`                   | The public key (JWK) from the wizard.                                                                                                           |
| `app_name`              | The app's name in Okta. The default is `Eon Backup`.                                                                                            |
| `grant_workflows_scope` | Whether to grant the `okta.workflows.invoke.manage` scope. The default is `true`. Set it to `false` for an org that doesn't use Okta Workflows. |

The module's outputs are `client_id` and `key_id`.

#### Enter the Client ID

1. Copy the Client ID of the app.
   Find it in the script's output, in the Terraform `client_id` output, or on the app's **General** tab in Okta.

2. In **Client ID**, paste the Client ID, then select **Next**.
   The wizard fills in the key ID.

#### Choose whether to back up Okta Workflows

To back up the rest of the org without Okta Workflows, leave **Back up Okta Workflows** off and select **Review**.
You can add Okta Workflows later, as [Back Up Okta Workflows] describes.

To back up Okta Workflows too, set up an export flow:

1. Turn on **Back up Okta Workflows**.

2. In **Folders to back up**, enter the number of top-level folders to back up, from 1 to 25.
   Eon backs up each folder with its nested folders.

3. Select **Download export flow**.

Then, in Okta Workflows, import the file and turn on the flow:

1. In the Okta Workflows console, open the folder to keep the export flow in, and select **Actions** → **Import**.
   The **Import to folder** dialog opens.
   Add the export flow file you downloaded from Eon.

2. Okta asks you to replace each folder the export flow backs up.
   For each one, select **Replace Folder**, choose a top-level folder to back up, and select **Choose**.
   Then select **OK**.

3. Open the imported flow, **Eon Backup - Export**.
   On its **API Endpoint** card, open **Endpoint settings**, select **Secure with OAuth 2.0**, and allow the Eon backup app.

4. Turn the flow on.
   Then copy the **Invoke URL** from the API Endpoint card's **Endpoint settings**.

Back in the wizard:

1. In **Export flow invoke URL**, paste the invoke URL.

2. Select **Review**.

#### Connect the org

1. Check the **Connection details**: **Organization URL**, **Client ID**, **Key ID**, and **Okta Workflows backup**.

2. Select **Connect**.
   Eon checks that the app has the read scopes, can read the org, and has an admin role that can read it.
   The wizard shows **Okta connected successfully.**, or **Okta connected with Okta Workflows backup.** when you set up Okta Workflows.
   If it shows **Okta connected, but the Okta Workflows export flow wasn't saved**, the org is connected without Okta Workflows backup, as [Troubleshooting](#troubleshooting) describes.

Eon adds the org to the SaaS applications page.
To start backing up the org, assign it to an [Okta backup policy].
To back up Okta Workflows later, see [Back Up Okta Workflows].
To disconnect the org later, see [Manage Source Accounts].

[Back Up Okta Workflows]: /data-protection/saas-workloads/okta/connections/back-up-okta-workflows

[Okta backup policy]: /data-protection/backup-and-protection/backup-configuration/backup-policies/okta/create-okta-backup-policies

[Manage Source Accounts]: /data-protection/backup-and-protection/backup-configuration/source-accounts/manage-source-accounts

## Manual procedure

Use this procedure to create the Okta app in the Okta Admin Console instead of using the Bash script or Terraform.
In the **Create the Okta app** step of the connection procedure, follow these steps in place of the Bash and Terraform options, then continue in the wizard with the **Enter the Client ID** step.

#### Create the API Services app

1. Sign in to the Okta Admin Console as a Super Administrator.

2. Go to **Applications** → **Applications** and select **Create App Integration**.

3. Choose **API Services** and select **Next**.

4. Name the app, such as `Eon Backup`, and select **Save**.

#### Add the public key

1. On the app's **General** tab, select **Edit** under **Client Credentials**.

2. Set **Client authentication** to **Public key / Private key**, and keep **Save keys in Okta**.

3. Select **Add key**, paste the public key (JWK) from the wizard, and select **Done**.

4. Select **Save**.

#### Grant the read scopes

On the **Okta API Scopes** tab, select **Grant** next to each of these scopes:

| Okta API scope                   |
| -------------------------------- |
| `okta.users.read`                |
| `okta.groups.read`               |
| `okta.apps.read`                 |
| `okta.policies.read`             |
| `okta.authorizationServers.read` |
| `okta.idps.read`                 |
| `okta.networkZones.read`         |
| `okta.roles.read`                |
| `okta.userTypes.read`            |
| `okta.orgs.read`                 |

To back up Okta Workflows, also grant `okta.workflows.invoke.manage`.
The connection check doesn't require it.

#### Assign the Read-only Administrator role

On the **Admin roles** tab, select **Edit assignments**, choose **Read-only Administrator**, and select **Save Changes**.

#### Grant read access to admin assignments

The `okta.roles.read` scope doesn't replace this admin permission.

1. Go to **Security** → **Administrators** → **Roles**, and create the role **Eon Backup - View admin assignments** with the permission **View roles, resources, and admin assignments**.

2. Under **Resources**, create a resource set that contains **All Identity and Access Management resources**, such as `Eon Backup - All IAM resources`.

3. On the app's **Admin roles** tab, assign the custom role with that resource set, in addition to Read-only Administrator.

## Troubleshooting

When a connection fails, the wizard shows one of these messages in a dialog.

#### Okta connected, but the Okta Workflows export flow wasn't saved

#### The issue

The wizard shows the message `Okta connected, but the Okta Workflows export flow wasn't saved (<error>). Add it from the Okta account's menu under Edit setup.`
The org is connected, but Eon backs up the rest of the org without Okta Workflows.

#### The fix

In the row of the org, select  (Actions) and then **Edit setup**, and add the export flow as [Back Up Okta Workflows] describes.

#### The Okta app is missing Okta API scopes

#### The issue

The wizard shows the message `The Okta app is missing the Okta API scopes <list>; grant them on the app's Okta API Scopes tab and connect again`.

#### The fix

On the app's **Okta API Scopes** tab in Okta, select **Grant** next to each scope that the message lists.
Then select **Connect** again.

#### Okta refused the requested scopes

#### The issue

The wizard shows the message `Okta refused the requested scopes; grant the Okta app the Okta API scopes <full list> and connect again`.

#### The fix

On the app's **Okta API Scopes** tab in Okta, grant every scope that the message lists.
Then select **Connect** again.

#### The Okta app has no admin role that can read the organization

#### The issue

The wizard shows the message `The Okta app has no admin role that can read the organization; assign it the Read-only Administrator role on the app's Admin roles tab and connect again`.

#### The fix

On the app's **Admin roles** tab in Okta, assign the Read-only Administrator role.
Then select **Connect** again.

#### Invalid Okta credentials or organization URL

#### The issue

The wizard shows the message `Invalid Okta credentials or organization URL`.

#### The fix

Check the Client ID, the public key you added to Okta, and the Organization URL.
Then select **Connect** again.

#### Failed to validate the Okta organization

#### The issue

The wizard shows the message `Failed to validate the Okta organization; check the signing key and try again`.

#### The fix

Check that the public key in Okta is the key the wizard shows.
Then select **Connect** again.

#### Okta API returned an HTTP error

#### The issue

The wizard shows the message `Okta API returned HTTP <code>`.
Okta throttled the request or returned a server error.

#### The fix

Select **Connect** again.

#### The Okta org is already connected

#### The issue

The wizard shows the message `The Okta org <url> is already connected as "<account name>". Disconnect that account first, or reconnect it from its settings.`
The org is already a source org in Eon.

#### The fix

In the row of the org, select  (Actions) and then **Disconnect**, or **Reconnect** if its status is **Not Connected** or **Error**.

#### Okta signing key was not found

#### The issue

The wizard shows the message `Okta signing key was not found`.

#### The fix

Generate the signing key again, and add the new public key to the Okta app.
Then select **Connect** again.

## See also

* [Okta Support]
* [About Okta Backup Policies]
* [Back Up Okta Workflows]
* [Okta: Connect Restore Orgs]
* [About Source Accounts]

[Okta Support]: /data-protection/saas-workloads/okta/okta

[About Okta Backup Policies]: /data-protection/backup-and-protection/backup-configuration/backup-policies/okta/about-okta-backup-policies

[Okta: Connect Restore Orgs]: /data-protection/saas-workloads/okta/connections/connect-restore-orgs

[About Source Accounts]: /data-protection/backup-and-protection/backup-configuration/source-accounts/about-source-accounts