How to connect Excel to Composio

4 min read

Composio connects AI agents to Excel so they can read and update workbooks stored in OneDrive and SharePoint. Access is limited by the permissions you approve and your account’s existing access.

This guide shows you how to set up OAuth credentials and connect Excel to Composio.

Part 1: Connect Excel with Composio Managed OAuth

Step 1: Create an Auth Config and Select Excel

1. Open the Composio platform, go to Auth Configs and click Create.

Composio Auth Configs with Create

2. Search for and select Excel.

Excel in the toolkit picker

Step 2: Choose Composio Managed OAuth

1. Enter a Config Name, such as Excel Managed Guide, and click Next.

Name the Excel managed auth config

2. Choose OAuth 2.0 and Composio Managed.

Excel OAuth 2.0 and Composio Managed options

3. Under Scopes, choose permissions required by your integration and supported by your app registration. Click Create Auth Config.

Permission reference. For workbook operations such as listing worksheets, Microsoft requires Files.ReadWrite, even for that read operation. User.Read supports profile access and offline_access continued access. Other workflows can need additional permissions. Choose for your own workflow; the screenshots are examples. Microsoft permission reference.

Three selected workbook-example scopes

Step 3: Connect Your Microsoft Account

1. Open the auth config and click Connect Account.

Connect Account on the Excel managed auth config

2. Select the Microsoft account that can access your workbook and sign in.

Microsoft account picker for Excel managed OAuth

3. If Microsoft requests permissions, review them before accepting. Tenant policy may require administrator approval. Existing authorization can skip the permissions prompt. Wait for the successful Composio connection page.

Successful Excel managed OAuth callback

Step 4: Confirm the Connected Account Is Active

1. Return to the auth config’s Connected Accounts tab and check Active on the account row. The auth config’s Enabled state is separate from the connected-account status.

Excel managed connected account showing Active

Part 2: Use your own OAuth credentials

Step 1: Register an App in Microsoft Entra ID

1. In the Azure portal, open App registrations and choose New registration. Give the app a descriptive name and choose supported account types for your deployment. The screenshot allows organizational and personal Microsoft accounts for reuse across Microsoft services. With Composio’s default common sign-in endpoint, use an audience that allows the accounts you intend to connect.

2. Select Web and register Composio’s original callback exactly, then click Register.

https://backend.composio.dev/api/v1/auth-apps/add

Microsoft app registration with Web and the original v1 redirect

Step 2: Copy the Client ID and Create a Client Secret

1. On Overview, copy the Application (client) ID.

App Overview with identifiers censored

2. Open Certificates & secrets and click New client secret.

Certificates and secrets with New client secret

3. Add a description, choose an expiry matching your rotation policy and click Add. The example uses 180 days. Rotate before expiry.

Client-secret description and expiry

4. Copy the secret Value immediately and store it privately. Use the Value, not the Secret ID. Azure does not reveal the full Value on later visits. Keep public client flows disabled for this confidential Web client.

Client-secret Value and Secret ID censored

Step 3: Add Microsoft Graph Delegated Permissions

1. Open API permissions and click Add a permission.

API permissions with Add a permission

2. Select Microsoft Graph.

Microsoft Graph in the API picker

3. Choose Delegated permissions, so the app acts for the signed-in user.

Microsoft Graph delegated permission option

4. Choose the delegated permissions needed for the operations your integration will use. Then click Add permissions.

Selected Files.ReadWrite delegated permission

5. Review your configured permissions. If you reuse an app, preserve permissions relied on by its other integrations and align the Composio selection with your own workflow.

Configured Files.ReadWrite permission details

Step 4: Create the Auth Config with Your Own Credentials

1. In Composio, create an auth config for Excel. Enter a name, such as Excel Custom Guide, and click Next.

Name the Excel custom auth config

2. Choose OAuth 2.0 and Your Own Credentials. Enter the app’s Client id and client-secret Value. The screenshot leaves those inputs empty for privacy.

Excel custom OAuth credential inputs

3. Keep the Redirect URI identical to the registered Web callback. Under Scopes, choose permissions required by your integration and supported by your app registration. Click Create Auth Config.

Original Composio redirect and the three workbook-example scopes

Step 5: Connect and Review the Requested Access

1. Open the custom auth config and click Connect Account.

Connect Account on the custom Excel configuration

2. Choose the Microsoft account that can access the workbook and sign in.

Microsoft account picker for custom Excel OAuth

3. Review the app name and requested file access before accepting. Confirm that the app is your own registration. The request grants file read/write access and continued access; it is not a read-only workbook permission. Leave Consent on behalf of your organisation unchecked unless an administrator intends tenant-wide approval.

Custom Excel app file-access consent review

Step 6: Confirm the Custom Connected Account Is Active

1. After approval, return to Composio and check Active on the custom auth config’s Connected Accounts tab. The account’s workbook/file permissions continue to apply. Use additional scopes only when the intended Excel tools need them.

Copy the Auth Config ID from Composio and use it in your application’s integration setup.

Connected account showing verified Active status

Share