Box signs users in with their Box account. It is an enterprise content platform, so this connector usually appears on internal tools and document-centric B2B products.

## Copy the redirect URI

In the [Authdog console](https://console.authdog.com), select the project and environment, open **Authentication > Providers**, find **Box**, and click **Enable**. Copy the redirect URI shown in the form:

```url
https://identity.authdog.com/api/v1/callback/<connectionId>
```

## Create the application

1. Open the [Box Developer Console](https://app.box.com/developers/console) and create a **Custom App**.
2. Choose **User Authentication (OAuth 2.0)** as the authentication method.
3. Under **OAuth 2.0 Redirect URI**, paste the redirect URI from Authdog.
4. Under **Application Scopes**, keep **Read all files and folders** or narrower — sign-in only needs the user record.
5. Save changes, then copy the **Client ID** and **Client Secret**.

## Configure Authdog

| Field | Value |
| --- | --- |
| **Client ID** | The client identifier from the provider |
| **Client Secret** | The client secret from the provider |

Save, then toggle the connection **active**.

## What Box returns

Authdog requests the provider's default scopes and reads the profile from `https://api.box.com/2.0/users/me`.

The users endpoint returns the Box user ID, name, login (which is the email address), and avatar.

Apps in a Box enterprise may need admin authorization before anyone can use them. If sign-in fails for everyone in one company but works elsewhere, that approval is the first thing to check.

## Test it

1. Open your environment's hosted sign-in page, or link to `https://identity.authdog.com/api/v1/signin/<connectionId>`.
2. Select the Box button and complete the flow.
3. Confirm the user appears under **Users** in the console with a Box identity linked.

## Troubleshooting

| Symptom | Cause |
| --- | --- |
| `unauthorized_client` | The app has not been authorized by the enterprise admin |
| `invalid_grant` | Redirect URI mismatch, or the authorization code was already used |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own `connectionId`, and so its own redirect URI to register |

## Related

| Read | To learn how to |
| --- | --- |
| [Connectors](/docs/connectors) | Set up any other social provider |
