Skip to navigation

Okta: Connect Restore Orgs

Who can use this feature

Anyone with these permissions: Manage restore connections (Cloud workloads, SaaS applications)

Connecting a restore org lets you bring a deleted or changed object, such as a user, group, or app, back from a snapshot, instead of rebuilding it and its assignments by hand in Okta. A restore org is the Okta org that Eon writes the recovered objects into.

This article explains how to connect an Okta org as a restore org, including how to create the Okta app that Eon restores through.

Connect a restore org

In this procedure, you’ll generate a signing key in Eon, create an Okta app that signs in with it, and enter the app’s Client ID in Eon.

You can connect a restore org from the SaaS applications page in the Eon console.

Before you start

Before you connect an Okta restore 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.

  • 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, so you can revoke it once the app is set up.

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

1

Enter the Okta org

  1. Go to Settings → Restore connections → SaaS applications, click New Connection, and select Connect Okta. The Configure Okta restore wizard opens.

  2. In Organization URL, enter the address your users sign in at, such as https://acme.okta.com. Use the Okta org that the snapshots you want to restore came from. Don’t enter the Admin Console address, which ends in -admin.

  3. Enter a Restore account name, then click Continue.

2

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.

  1. Click Generate signing key. The wizard shows the public key (JWK).

  2. Keep the wizard open until you create the restore org. Each run of the wizard generates a new key, so the Okta app must use the public key shown in the run you finish.

3

Create the Okta app

Create an API Services app for restoring, separate from the app you created for the source org. You can use Bash, Terraform, or the manual procedure. All three create the same app. Under Set up the Okta app, the Bash and Terraform options show the snippet filled in with your Organization URL and public key.

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

The script asks for your API token with hidden input, or reads it from the OKTA_API_TOKEN environment variable. You can run the script again: it finishes a run that stopped halfway, and a run on a finished app changes nothing.

  • --org-url: the Okta org URL.

  • --jwk: the public key (JWK) from the wizard.

  • --app-name: the app’s name in Okta. The default is Eon Restore.

  • --dry-run: reads the org and prints the changes the script would make, without making them. A dry run still needs the API token.

  • --help: lists the options, scopes, and admin role.

The Bash script and the Terraform module create the app, add the public key, grant the required and optional scopes, and assign the Super Administrator role.

When the app is ready, click Continue.

4

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 click Continue. The wizard already has the key ID.

5

Create the restore org

Click Create restore account. Eon connects to your Okta org as the app you created, and verifies the manage scopes before it saves the restore org.

You can now restore users, groups, apps, and configuration into this Okta org. For instructions, see the restore articles listed in Okta Support. An Okta Workflows restore doesn’t write to the org: it produces an import file that you import into Okta Workflows yourself. For instructions, see Restore Okta Workflows.

Eon doesn’t check for the Super Administrator role or the optional scopes when you create the restore org, so the connection can succeed and a later restore of an object that needs one of them can fail. For the messages Eon shows when the connection fails, see Troubleshooting.

Create the Okta app manually

Use this procedure to create the restore app in the Okta Admin Console instead of using Bash or Terraform. Follow it in place of the script or Terraform in step 3 of the connection procedure, then return to the wizard.

1

Create the API Services app

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

  2. Go to Applications → Applications and click Create App Integration.

  3. Select API Services and click Next.

  4. Name the app, such as Eon Restore, and click Save.

2

Add the public key

  1. On the app’s General tab, click Edit under Client Credentials.

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

  3. Click Add key, paste the public key (JWK) from the wizard, and click Done.

  4. Click Save.

3

Grant the scopes

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

  • Required: okta.orgs.read, okta.users.manage, okta.groups.manage, and okta.apps.manage. Eon checks these scopes when you create the restore org.

  • Optional: okta.networkZones.manage, okta.userTypes.manage, and okta.policies.manage. They let Eon restore network zones, user types, and policies. Group rules are restored with okta.groups.manage. An Okta Workflows restore needs no scope, because it only builds an import file.

Without an optional scope, Eon still restores users, groups, and apps, and fails only the objects that need the missing scope.

4

Assign the Super Administrator role

On the app’s Admin roles tab, click Edit assignments, select Super Administrator, and click Save Changes.

Okta checks the app’s admin role as well as its scopes on every call. Only a Super Administrator can change app sign-in and profile enrollment policies, or the priority of any policy.

5

Copy the Client ID

On the app’s General tab, copy the Client ID. You’ll paste it in the wizard’s Client ID step.

Troubleshooting

When a connection fails, Eon shows one of these messages.

The issue

Eon 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, click Grant next to each scope that the message lists. Then click Create restore account again.

The issue

Eon shows the message Okta refused the requested scopes; grant the Okta app the Okta API scopes <list> and connect again.

The fix

On the app’s Okta API Scopes tab in Okta, grant the four required scopes: okta.orgs.read, okta.users.manage, okta.groups.manage, and okta.apps.manage. Then click Create restore account again.

The issue

Eon shows the message The Okta app has no admin role that can read the organization; assign it the <role> role on the app's Admin roles tab and connect again.

The fix

On the app’s Admin roles tab in Okta, assign the Super Administrator role, even if the message names a different role. Then click Create restore account again.

The issue

Eon shows the message Invalid Okta credentials or organization URL.

The fix

Check the Organization URL, the Client ID, and that the public key in the Okta app is the key the wizard shows. Then click Create restore account again.

The issue

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

The fix

Check that the public key in the Okta app is the key the wizard shows. Then click Create restore account again.

The issue

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

The fix

Wait, then click Create restore account again.

The issue

Eon shows the message Okta signing key was not found. Eon can’t find the signing key for this connection.

The fix

Open the wizard again, generate a new signing key, and add the new public key to the Okta app. Then click Create restore account again.

See also