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

# MCP Enterprise Managed Auth

> Let users connect to Omni from Claude by signing in through your Okta organization.

> [!NOTE]
>
> Enterprise Managed Auth is in early access. Reach out to Omni support to have it enabled for your organization.

Enterprise Managed Auth lets users connect to Omni from an AI client such as Claude by signing in through your Okta organization.

For each user, Omni exchanges a token from Okta for an Omni key that lasts one hour. When a key expires, the client gets a new one through Okta. The key works with the Omni MCP server and the [Omni API](https://docs.omni.co/api.md).

## Requirements

To follow the steps on this page, you'll need:

* **In Omni**:
  * Organization Admin permissions, and the [**MCP server** setting](https://docs.omni.co/ai/settings/mcp.md#mcp-server) enabled
  * For each user who connects, an Omni account or a pending invitation with an email on an allowed domain
* **In Okta**: Admin permissions, and Cross App Access available in your Okta organization
* **In Claude**: Admin permissions in a Claude Team or Enterprise organization

## Setup

**1. Create an OIDC app for Omni in Okta**

In Okta, create a custom OIDC app for Omni and turn on Cross App Access for it as a resource app. Use an OIDC app even if your users sign in to Omni with SAML.

When Okta asks for the resource app's details, copy the values from the **Okta setup** card in **AI Hub > MCP > Enterprise managed auth**:

| Okta field | Omni value |
| - | - |
| Authorization server issuer (audience) | **Audience** |
| Resource | **Resource** |

See Okta's [Cross App Access for resource apps](https://developer.okta.com/docs/journeys/XAA-resource-app/main/) guide for more information.

**2. Trust your Okta organization in Omni**

In Omni, navigate to **AI Hub > MCP > Enterprise managed auth**. In the **Settings** card:

1. In **Okta org URL**, enter the URL of your Okta org authorization server, such as `https://acme.okta.com`. The URL must exactly match the `iss` value in your Okta tokens, and its host must end in `okta.com`, `oktapreview.com`, or `okta-emea.com`.
2. In **Allowed email domains**, enter the email domains your users use, such as `acme.com`. Matching is exact, so list each subdomain you need.
3. Under **Account creation**, choose whether to turn on **Let new people in automatically**. When this is on, a user on an allowed domain gets an Omni account with the **Member** role the first time they connect. When this is off, invite each user to Omni first.
4. Click **Trust this Okta org**.

**3. Add an authorized application**

In the **Authorized applications** card, click **Add**. In **Client ID**, enter the client ID that Okta puts in the application's tokens. For Claude, enter the client ID that Claude's setup gives you for the Omni connector. It's a URL that starts with `https://claude.ai/oauth/`. Select how the application authenticates:

| Authentication | When to use it |
| - | - |
| **Client ID only** | The application sends its client ID alone. |
| **Client secret** | For your own backend. Omni generates the secret and shows it once. Store it with the backend's other credentials. |
| **Signed assertion** | The application signs its requests (`private_key_jwt`). The client ID must be the application's metadata URL, because Omni reads the application's keys from that URL. |

Click **Add app** to save.

**4. Turn on Enterprise Managed Auth**

At the top of the tab, turn on **Enterprise Managed Auth with Okta**. The toggle is available after you save at least one email domain and one application.

Omni accepts tokens from Okta while this toggle and the **MCP server** setting are both on.

**5. Set up the Omni connector in Claude**

In Claude's admin console, set up **Auto-connect** for the Omni connector with your Okta details.

See Claude's [Auto-connect your organization's apps to Claude](https://support.claude.com/en/articles/15537633) guide for more information.

After setup, the Omni connector is connected for each user the first time they use it in Claude.

## How Omni matches users

The first time a user connects, Omni matches them to their Omni account by email, on the allowed email domains. On later connections, Omni matches the user by their Okta user ID, so a user whose email changes keeps access.

A user's Omni permissions decide which [MCP tools](https://docs.omni.co/ai/mcp/tools) and data they can use.

## Removing access

| Action | Result |
| - | - |
| Remove a user in Okta | Okta stops issuing tokens for that user. Their current key expires within one hour. |
| Remove a user in Omni | The user's keys stop working on their next request. |
| Turn off **Enterprise Managed Auth with Okta** | Every key stops working on its next request. Omni keeps each user's Okta link, the applications, and the secrets for when you turn it back on. |
| Remove an authorized application | Omni refuses tokens for that client ID. Adding the application again generates a new secret. |

To change the **Okta org URL**, turn off **Enterprise Managed Auth with Okta** first. After the URL changes, Omni matches users by email again the next time they connect.

## Using your own backend

A backend that is registered as a client in Okta can get keys for its users in the same way. Add the backend's Okta client ID as an authorized application with **Client secret** authentication. Get an ID-JAG (Identity Assertion JWT Authorization Grant) for the user from Okta and send it to the token endpoint:

```http theme={null}
POST <AUDIENCE>/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
&assertion=<ID_JAG>
&client_id=<OKTA_CLIENT_ID>
&client_secret=<CLIENT_SECRET>
```

Replace `<AUDIENCE>` with the **Audience** value from the **Okta setup** card.

Use the `access_token` from the response to call the Omni API and the MCP server as that user. To get a new key, exchange a new ID-JAG.

## Troubleshooting

When an exchange fails, the token endpoint's response includes an `error_reason`:

| `error_reason` | Cause | What to do |
| - | - | - |
| `client_not_accepted` | The client ID isn't an authorized application, or the application sent the wrong secret or signed assertion. Returned with a `401` status. | Check that the **Client ID** in **Authorized applications** matches the client ID in the Okta token, and that the application sends its current secret. |
| `user_not_provisioned` | Omni found no user or invitation for the email, the email belongs to an Omni user who is linked to a different Okta user, or the user is an [External user](https://docs.omni.co/administration/users/external-users.md). | Invite the user to Omni, add their email domain, or turn on **Let new people in automatically**. |
| `user_removed` | The user was removed from Omni. | Invite the user again if they need access. |
| `email_not_verified` | Okta marked the user's email as unverified. | Verify the user's email in Okta. |
| `org_not_enabled` | The **MCP server** setting is off for the organization. | Turn the setting on in [**AI Hub > MCP**](https://docs.omni.co/ai/settings/mcp.md#mcp-server). |
| `assertion_rejected` | The **Okta org URL** in Omni doesn't match the token's `iss` value, or the token's signature is invalid. | Enter your Okta org authorization server URL in **Okta org URL**, exactly as it appears in the token's `iss` value. |
| `assertion_invalid` | The token isn't a well-formed ID-JAG. | Send the ID-JAG that Okta issues for the Omni resource app. |
| `assertion_expired` | The token expired, or its lifetime is longer than Omni accepts. | Exchange a new ID-JAG, and check the clock on the application's server. |
| `assertion_not_for_this_org` | The audience in Okta doesn't match the **Audience** value in Omni. | Copy the **Audience** value from the **Okta setup** card into Okta again. |
| `assertion_not_for_this_client` | Okta issued the token to a different client ID than the one that sent it. | Send the request with the client ID that Okta issued the token to. |
| `assertion_replayed` | The token was already used. | Exchange a new ID-JAG. |
| `rate_limited` | Too many exchanges for one user. Returned with a `429` status. | Wait for the time in the `Retry-After` header. |
| `temporarily_unavailable` | Omni couldn't reach Okta's keys or the application's keys. Returned with a `503` status. | Try again after the time in the `Retry-After` header. |
| `request_invalid` | The request is missing `assertion` or `client_id`. | Include both parameters in the request. |
| `resource_not_this_server` | The `resource` in the request isn't this Omni instance's MCP server. | Set `resource` to the **Resource** value from the **Okta setup** card. |
| `assertion_not_for_this_server` | The `resource` in the Okta token isn't this Omni instance's MCP server. | Copy the **Resource** value from the **Okta setup** card into Okta again. |

## Related

* [MCP authentication](https://docs.omni.co/ai/mcp/authentication) - Compare the ways to authenticate MCP clients
* [MCP OAuth authentication](https://docs.omni.co/ai/mcp/authentication/oauth.md) - Authenticate through your browser
* [MCP API key authentication](https://docs.omni.co/ai/mcp/authentication/api-key.md) - Authenticate with a key you create and manage
* [Omni MCP settings](https://docs.omni.co/ai/settings/mcp.md) - Turn the MCP server and groups of tools on or off
