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

# Get Credentials

> Step-by-step instructions for obtaining Microsoft Outlook OAuth credentials.

## Authentication Method

* **[`oauth_2`](/concepts/oauth)** - OAuth 2.0 (Microsoft identity platform)

## OAuth App Setup

### Step 1: Register an App in Azure

1. Go to the [Azure portal](https://portal.azure.com)
2. Navigate to **Azure Active Directory** → **App registrations**
3. Click **New registration**
4. Fill in the app name and select the account type
5. Add a redirect URI (e.g., `http://localhost:3456/callback`) under **Web**
6. Click **Register**

### Step 2: Configure API Permissions

1. Go to **API permissions** → **Add a permission** → **Microsoft Graph**
2. Add delegated permissions:
   * `Mail.ReadWrite` — Read and write emails
   * `Mail.Send` — Send emails
   * `Calendars.ReadWrite` — Read and write calendars
   * `Contacts.ReadWrite` — Read and write contacts

### Step 3: Create a Client Secret

1. Go to **Certificates & secrets** → **New client secret**
2. Give it a description and expiry
3. Copy the **Value** immediately — you won't see it again

### Step 4: Store Credentials

```bash theme={null}
pnpm corsair setup --plugin=outlook client_id=your-application-id client_secret=your-client-secret
```

### Step 5: Authorize

```bash theme={null}
pnpm corsair auth --plugin=outlook
```

This opens a browser window to complete the Microsoft OAuth flow. Tokens are saved automatically.

## Required Credentials Summary

| Credential              | Required For | Where to Find                                   |
| ----------------------- | ------------ | ----------------------------------------------- |
| Application (Client) ID | OAuth flow   | Azure App registration → Overview               |
| Client Secret           | OAuth flow   | Azure App registration → Certificates & secrets |

For general information about how Corsair handles authentication, see [Authentication](/concepts/auth).
