> ## Documentation Index
> Fetch the complete documentation index at: https://www.osohq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Okta

Connect your Okta organization to author policies that apply to particular users and groups. Oso authenticates to Okta's API via an OAuth API Services App.

This guide details the process of setting up an API Services app within your Okta organization and connecting it to Oso.

## 1. Create an API Services app

In the Sidebar, click **Applications > Applications** then click **Create App Integration** and select **Service App**

<Frame>
  <img src="https://mintcdn.com/osoinc/NX-fxl9iqZA1dB7M/images/connect-okta-new-app-integration.png?fit=max&auto=format&n=NX-fxl9iqZA1dB7M&q=85&s=066a9a1d302d561de3ca5c485eecbf05" alt="Connect Okta New App Integration" width="3488" height="1908" data-path="images/connect-okta-new-app-integration.png" />
</Frame>

Give the app a meaningful name, like Oso OAuth App.

## 2. Register the public key

<video src="https://mintcdn.com/osoinc/C_x5Ep9wfOrkaPVw/videos/connect-okta-public-key.mp4?fit=max&auto=format&n=C_x5Ep9wfOrkaPVw&q=85&s=598a71878b9efe4ad86566a28933134c" controls data-path="videos/connect-okta-public-key.mp4" />

On the app's **General** tab, click **Add key** and paste the **Oso public key** from the Connect dialog (see the video above). Under **Client Credentials**, set **Client authentication** to **Public key / Private key**. **Click Save**.

## 3. Turn off DPoP

Oso uses `private_key_jwt`, not DPoP, to sign token requests. So you must disable DPoP in your OAuth App.

<Frame>
  <img src="https://mintcdn.com/osoinc/NX-fxl9iqZA1dB7M/images/connect-okta-turn-off-depop.png?fit=max&auto=format&n=NX-fxl9iqZA1dB7M&q=85&s=b0fbf0b7e53c746a58b365e88c51d75c" alt="Connect Okta Turn Off Depop" width="1480" height="1266" data-path="images/connect-okta-turn-off-depop.png" />
</Frame>

<br /><br />In the **General Settings** section, make sure **Require Demonstrating Proof of Possession (DPoP) header in token requests** is **unchecked**.

## 4. Grant the read scopes

On the **Okta API Scopes** tab, grant **okta.users.read** and **okta.groups.read**

<Frame>
  <img src="https://mintcdn.com/osoinc/NX-fxl9iqZA1dB7M/images/connect-okta-assign-scopes.png?fit=max&auto=format&n=NX-fxl9iqZA1dB7M&q=85&s=fca415896ef276c6e6e36081d047cf3e" alt="Connect Okta Assign Scopes" width="1526" height="1150" data-path="images/connect-okta-assign-scopes.png" />
</Frame>

## 5. Assign an admin role

On the **Admin roles** tab, choose **Edit assignments** and assign **Read-only Administrator**

<Frame>
  <img src="https://mintcdn.com/osoinc/NX-fxl9iqZA1dB7M/images/connect-okta-read-only-admin.png?fit=max&auto=format&n=NX-fxl9iqZA1dB7M&q=85&s=2ca19e531b0f7ff016e59177aed36d01" alt="Connect Okta Read Only Admin" width="1996" height="1244" data-path="images/connect-okta-read-only-admin.png" />
</Frame>

## 6. Connect from Oso

<video src="https://mintcdn.com/osoinc/C_x5Ep9wfOrkaPVw/videos/connect-okta-pass-credentials.mp4?fit=max&auto=format&n=C_x5Ep9wfOrkaPVw&q=85&s=bdb3cd660ddbcd8f31e9b75ae4cd529a" controls data-path="videos/connect-okta-pass-credentials.mp4" />

Head back to the **Connect Okta** dialog:

* **Okta org URL** — your Okta domain, e.g. `acme.okta.com`

* **Client ID** — from the app's General tab.

Click **Connect**.

# Self-Hosted

Two things differ for self-hosted deployments:

1. You bring your own signing keypair. Oso Cloud generates and rotates the Okta signing key for you; self-hosted does not. Before connecting:
   1. Generate an RSA keypair: `openssl genrsa -out okta-idp-key.pem 2048`
   2. Give `carpincho` — the background service in your self-hosted stack that runs this sync — the private half via `OKTA_JWT_PRIVATE_KEY`:<br /><br />`export OKTA_JWT_PRIVATE_KEY="$(cat okta-idp-key.pem)"`<br />
   3. Register the public half on your Okta app in step 2 (as a JWK). This replaces "paste the Oso public key from the dialog" — self-hosted builds don't display Oso Cloud's key in the Connect dialog.
2. Sync runs from your own network. In Oso Cloud, calls to Okta come from Oso's servers; self-hosted, `carpincho` makes them from your infrastructure. Ensure it can reach https\://\<your-org>.okta.com, and if your Okta org restricts API access by network zone or IP allowlist, allow your self-hosted egress address.
