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

# Connect Outlook, OneDrive, SharePoint and Teams to AI agents
URL: https://metorial.com/docs/platform/integrations/microsoft-365

Publish Outlook, OneDrive, SharePoint and Teams in a Metorial portal with per-user Microsoft sign-in, your own Entra app registration and read-only Graph scope.

---

Microsoft 365 is four integrations in Metorial: Outlook for mail, calendar, contacts and tasks, plus OneDrive, SharePoint and Microsoft Teams. Each employee signs in with their own Microsoft account, and the agent works through Microsoft Graph with that person's delegated permissions. You can register your own app in Microsoft Entra, so your tenant controls consent.

**What you'll learn**

* How an admin publishes the Microsoft integrations and how an employee connects
* Which Graph scopes each integration can request
* How to register your own Entra app and grant admin consent

**Before you start**

* A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
* A Microsoft work account for each person who will connect
* To use your own app: permission to register applications in Microsoft Entra

## Sign-in methods

All four integrations offer the same two OAuth methods.

| Method              | Who can sign in                                           |
| ------------------- | --------------------------------------------------------- |
| **Work Only**       | Work and school accounts in Microsoft Entra               |
| **Work & Personal** | Work and school accounts, and personal Microsoft accounts |

Choose **Work Only** for a company rollout. It keeps personal mailboxes and personal OneDrive out.

## Admin: publish the Microsoft integrations

### In the dashboard

#### 1. Open Shared Resources

Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

#### 2. Share each product

Select **Share a Resource**, then **New Integration**, and choose Outlook. Under **Auth Method**, select **Work Only**. For how members connect, choose **Each person connects**. Repeat for OneDrive, SharePoint and Microsoft Teams as needed.

#### 3. Choose who gets them

Add the access groups that should see each one.

### With the CLI

The CLI cannot create the per-user integrations. Once they exist, list who has them:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search outlook
```

## Employee: connect your Microsoft account

### In the portal

#### 1. Open the integration

Sign in to your portal and open Outlook, OneDrive, SharePoint or Microsoft Teams.

#### 2. Authenticate

Under **Quick setup**, select **Authenticate**. A Microsoft tab opens. Sign in with your work account and accept the permissions.

#### 3. Confirm

The status changes to **Configured**. Each Microsoft product is a separate connection.

If Microsoft asks for admin approval instead of showing the permissions, your tenant does not let people consent on their own. Ask your Microsoft administrator to grant admin consent, as described below.

### With the CLI

```bash
metorial catalog search outlook
metorial catalog get <catalog-item-id>
metorial setup <catalog-item-id> --auth-method <auth-method-id>
```

## Scopes

The integrations request delegated Microsoft Graph permissions.

| Integration | Read                                                                                  | Write                                                                                         |
| ----------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Outlook     | `Mail.Read`, `Mail.ReadBasic`, `Calendars.Read`, `Contacts.Read`, `Tasks.Read`        | `Mail.ReadWrite`, `Mail.Send`, `Calendars.ReadWrite`, `Contacts.ReadWrite`, `Tasks.ReadWrite` |
| OneDrive    | `Files.Read`, `Files.Read.All`, `Sites.Read.All`                                      | `Files.ReadWrite`, `Files.ReadWrite.All`, `Sites.ReadWrite.All`                               |
| SharePoint  | `Sites.Read.All`, `Files.Read.All`                                                    | `Sites.ReadWrite.All`, `Sites.Manage.All`, `Sites.FullControl.All`, `Files.ReadWrite.All`     |
| Teams       | `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `Chat.Read`, `ChannelMessage.Read.All` | `Chat.ReadWrite`, `ChatMessage.Send`, `ChannelMessage.Send`, `Channel.Create`                 |

Every integration also requests `User.Read` and `offline_access`. Outlook can request the shared mailbox and shared calendar scopes too, and Teams has more scopes for meetings, schedules and group membership.

You choose the set in the **Scopes** picker when you create your own auth credentials. Because the permissions are delegated, the agent can never reach more than the signed-in person can.

## Use your own Entra app registration

### 1. Start the credentials in Metorial

In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Outlook and copy the **Redirect URI**.

### 2. Register the app

In the Microsoft Entra admin center, browse to **Entra ID**, **App registrations** and select **New registration**. Enter a **Name**, choose the **Supported account types**, and select **Register**. Copy the **Application (client) ID**.

### 3. Add the redirect URI

Under **Manage**, select **Authentication**, then **Add Redirect URI**. Choose the **Web** platform, paste the redirect URI from Metorial, and select **Configure**.

### 4. Create a client secret

Select **Certificates & secrets**, **Client secrets**, **New client secret**. Add a description and an expiry, select **Add**, and copy the secret's **Value**. Microsoft never shows it again.

### 5. Add permissions and consent

Select **API permissions**, **Add a permission**, **Microsoft Graph**, **Delegated permissions**. Select the same scopes you will select in Metorial, then **Add permissions**. To approve them for everyone, select **Grant admin consent** for your tenant.

### 6. Finish in Metorial

Enter a **Name**, the **Client ID** and the **Client Secret**, select the scopes, and select **Create**. Repeat for the other Microsoft integrations. You can reuse the same app registration and add each redirect URI.

A client secret in Entra expires after 24 months at most. Put the expiry date in your calendar. When the secret expires, new sign-ins and token refreshes fail until you create a new secret and update the credentials in Metorial.

Microsoft's steps are in [Register an application](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app), [Add a redirect URI](https://learn.microsoft.com/en-us/entra/identity-platform/how-to-add-redirect-uri), [Add credentials](https://learn.microsoft.com/en-us/entra/identity-platform/how-to-add-credentials) and [Configure API permissions](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-configure-app-access-web-apis).

## Make the connection read-only

Allow only the read scopes, then open the integration's **Tool Filters** and set the write tool groups to **Reject**. For Outlook, that keeps tools such as `list_messages`, `get_message` and `list_events`, and removes `send_message` and `manage_message`. See [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list outlook
metorial tools <integration-id>
metorial call <integration-id> get_my_profile
```

`get_my_profile` takes no input and returns the Microsoft account you connected.

## Next steps

* [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials)
* [Per-user OAuth](https://metorial.com/docs/platform/guides/per-user-oauth)
* [Connect an app from the terminal](https://metorial.com/docs/platform/cli/connect-an-app)
* [SSO and SCIM](https://metorial.com/docs/platform/guides/sso-and-scim)