# Register Grok Bot in Okta

Register Grok Bot as an app in Okta so it can sign people in to your Dtwo gateway.

## Overview

Grok Bot needs its own app in Okta to sign people in to your Dtwo gateway. You only do this once for your organization. Everyone who uses Grok Bot with your gateway signs in through this app.

## Before you start

If you haven't set up your Dtwo gateway in Okta yet, follow [Configure Okta](/docs/identity-provider-okta) first, then come back here.

## Register Grok Bot

1. Go to **Applications and Resources → Applications** and select **Create App Integration**.
2. Set **Sign-in method** to **OIDC - OpenID Connect** and **Application type** to **Web Application**, then select **Next**.
3. Fill in the app settings:
   - **App integration name**: `Grok Bot`
   - **Grant type**: **Authorization Code** and **Refresh Token**
   - **Sign-in redirect URIs**: `https://www.cursor.com/agents/mcp/oauth/callback`. Grok Bot signs people in from Cursor's servers, so it uses a web redirect rather than a localhost one.
   - **Controlled access**: assign the users or groups who may use the gateway through this client
4. Select **Save**. On the **General** tab, copy the **Client ID** — this is the client's `<ClientId>` — and the **Client secret** under **Client Credentials** — this is the client's `<ClientSecret>`.

## Next steps

Use the client ID and secret you copied to [roll out Dtwo to your organization in Grok Bot](/docs/connect-client-grok-bot) or to [connect Grok Bot for yourself](/docs/connect-yourself-grok-bot).

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).