> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Use Metorial's OAuth app or register your own with the provider
URL: https://metorial.com/docs/platform/guides/metorial-oauth-app-or-your-own

Start with the OAuth app Metorial registers for you. Register your own when you need your name on the consent screen, your own scopes, or a tenant-only app.

---

Start with the OAuth app Metorial provides. When you create an integration for a provider that supports it, OAuth credentials are registered automatically and people can connect right away. Register your own OAuth app when the consent screen must show your company, when you need to control the scopes, or when your security team only allows apps registered in your own tenant.

**What you'll learn**

* When the managed OAuth app is enough
* How to add your own app's client ID and secret
* How to check which app people connect through

**Before you start**

* Access to the provider's developer or admin console
* For the CLI steps, [install `metorial-admin` and sign in](https://metorial.com/docs/build/sandboxes#install-the-tools)

## When each option fits

|                                        | Metorial's OAuth app                 | Your own OAuth app                   |
| -------------------------------------- | ------------------------------------ | ------------------------------------ |
| Setup                                  | None                                 | You create the app with the provider |
| Name on the consent screen             | The managed app                      | Your app                             |
| Scopes                                 | The integration's default set        | The scopes you allow on your app     |
| Tenants that only allow their own apps | May need an admin to approve the app | Fits                                 |
| Client secret                          | Maintained by Metorial               | You rotate it and update Metorial    |

Choose before many people connect. A connection is made through one OAuth app.

## Use your own app

### In the dashboard

#### 1. Start the credentials

Select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**, and choose the provider.

#### 2. Register the redirect URI

Copy the **Redirect URI** Metorial shows and add it to your OAuth app as an allowed redirect URL. Use the exact value.

#### 3. Enter the client details

Enter a **Name**, the **Client ID** and the **Client Secret**. Check that the listed scopes are allowed on your app, and select **Create**.

#### 4. Use them in the integration

When you create the integration, open **Auth Credentials** and pick the credentials you created.

### With the CLI

```bash
# Find the provider and see its auth methods and credentials
metorial-admin providers list --search github
metorial-admin providers auth <provider-id>

# Store your OAuth app
metorial-admin providers credentials create \
  --provider-id <provider-id> \
  --name "GitHub OAuth" \
  --config '{"type":"oauth","client_id":"<client-id>","client_secret":"<client-secret>","scopes":["repo","read:user"]}'

# Attach it when you add the provider to an integration
metorial-admin integrations providers create \
  --integration-id <integration-id> \
  --provider-id <provider-id> \
  --provider-auth-method-id <auth-method-id> \
  --provider-auth-credentials-id <credentials-id>
```

`providers auth` prints the auth method IDs. `providers credentials list --origin custom` lists the OAuth apps you added.

## Check it worked

Connect the integration as a test user in the portal. The provider's consent screen shows your app's name and the scopes you allowed.

Tokens are stored in Metorial Vault either way and are not passed to the model, the AI client or the person. Some apps, such as Google Workspace and Microsoft 365, need a workspace admin to approve an OAuth app before anyone can connect. The integration page creates a setup link to send to that admin.

To allow OAuth only, open organization settings, **MCP Configuration**, **MCP Auth**, and turn on **Only allow OAuth authentication methods**.

## Next steps

* [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the same steps with screenshots
* [Shared credentials or per-user OAuth](https://metorial.com/docs/platform/guides/shared-credentials-or-per-user-oauth): who connects, and whose permissions apply
* [How per-user OAuth works](https://metorial.com/docs/platform/guides/per-user-oauth): the call flow and where credentials are stored