MetorialDocs

Connect Outlook, OneDrive, SharePoint and Teams to AI agents

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

Sign-in methods

All four integrations offer the same two OAuth methods.

MethodWho can sign in
Work OnlyWork and school accounts in Microsoft Entra
Work & PersonalWork 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

Open Shared Resources

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

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.

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:

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

Employee: connect your Microsoft account

In the portal

Open the integration

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

Authenticate

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

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

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.

IntegrationReadWrite
OutlookMail.Read, Mail.ReadBasic, Calendars.Read, Contacts.Read, Tasks.ReadMail.ReadWrite, Mail.Send, Calendars.ReadWrite, Contacts.ReadWrite, Tasks.ReadWrite
OneDriveFiles.Read, Files.Read.All, Sites.Read.AllFiles.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All
SharePointSites.Read.All, Files.Read.AllSites.ReadWrite.All, Sites.Manage.All, Sites.FullControl.All, Files.ReadWrite.All
TeamsTeam.ReadBasic.All, Channel.ReadBasic.All, Chat.Read, ChannelMessage.Read.AllChat.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

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.

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.

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.

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.

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.

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, Add a redirect URI, Add credentials and Configure API permissions.

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.

Check it worked

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