Skip to main content
Microsoft Graph API for Outlook email, Calendar, OneDrive, and Teams. Best for workflows that read or send email, manage calendar events, access files on OneDrive, or interact with Teams channels. Covers the entire Microsoft 365 suite — unlike Google Workspace (Google-native) or Slack (messaging-only), Microsoft 365 is the dominant enterprise productivity stack. 10 example endpoints available through Lava’s AI Gateway. See the Microsoft 365 API docs for full documentation.
This provider requires your own credentials — connect your API key or OAuth account before use.
This is a catch-all provider — any valid URL under https://graph.microsoft.com/v1.0 is supported. Any Microsoft Graph v1.0 endpoint. Construct URL as https://graph.microsoft.com/v1.0/{path}. See https://learn.microsoft.com/en-us/graph/api/overview for full reference. The endpoints below are curated examples.

Connecting Your Microsoft 365 Account

Lava supports two ways to connect a Microsoft 365 account. Both end in the same place — Lava stores an encrypted OAuth token scoped to your wallet and uses it only to forward your own API calls. Via MCP (automatic):
  1. An agent connected to Lava’s MCP calls a Microsoft 365 endpoint for the first time.
  2. Lava detects no stored credential and returns a browser_flow_required response containing an authorization URL.
  3. Open the URL in a browser — you land on Microsoft 365’s consent screen.
  4. Review the requested scopes (listed below) and click Allow.
  5. Microsoft 365 redirects back to Lava. Your token is stored and the original agent call can now proceed.
Via dashboard:
  1. Sign in at lava.so/dashboard and open Connected Services (/dashboard/wallet/connected-services).
  2. Find Microsoft 365 in the list of available providers and click Connect.
  3. Authorize in Microsoft 365’s consent screen.
  4. You’re redirected back to the Connected Services page, where Microsoft 365 now appears under Stored Credentials.

Requested Permissions

Lava requests only the scopes needed to route your API calls. You see this list on Microsoft 365’s consent screen before you authorize.
ScopeWhat It Enables
offline_accessRefresh tokens
User.ReadRead user profile
Mail.ReadWriteRead and manage email
Mail.SendSend email
Calendars.ReadWriteRead and manage calendar
Files.ReadWriteRead and manage OneDrive files
Team.ReadBasic.AllList joined Teams
ChannelMessage.Read.AllRead Teams channel messages

Using Microsoft 365

Once connected, your credential is available to any agent or SDK call routed through Lava’s gateway — no token passing required. Call Microsoft 365 endpoints through https://api.lava.so/v1/forward and Lava injects your stored token automatically. See the Endpoints section below for example calls.

Removing Microsoft 365

Disconnecting removes Lava’s stored token immediately. Subsequent API calls return an auth error until you reconnect. Via dashboard:
  1. Open Connected Services.
  2. Find Microsoft 365 under Stored Credentials.
  3. Click the trash icon and confirm.
Via API or MCP:
  • REST: DELETE https://api.lava.so/v1/credentials/microsoft_o365 (returns 204 No Content).
  • MCP: call the disconnect_service tool with service: "microsoft_o365".
Also revoke from Microsoft 365: visit https://myapps.microsoft.com/, find the Lava app, and click Remove. This revokes the token on Microsoft 365’s side in addition to deleting it from Lava.

Data Handling

Lava stores your Microsoft 365 OAuth access and refresh tokens encrypted at rest, scoped to your wallet. Tokens are used only to forward your own API calls to https://graph.microsoft.com/v1.0. Refresh tokens rotate automatically; if a refresh fails, your next call prompts you to reconnect. Lava does not read, cache, or redistribute Microsoft 365 content beyond what’s needed to proxy a single request.

Support

Questions about this integration: support@lava.so.

Endpoints

Get the signed-in user profile

GET https://graph.microsoft.com/v1.0/me — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me', { method: 'GET' });

List inbox messages

GET https://graph.microsoft.com/v1.0/me/messages?$top=10&$orderby=receivedDateTime%20desc — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/messages?$top=10&$orderby=receivedDateTime%20desc', { method: 'GET' });

Send an email

POST https://graph.microsoft.com/v1.0/me/sendMail — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/sendMail', {
  body: {
"message": {
  "subject": "Hello from Lava",
  "body": {
    "contentType": "Text",
    "content": "This email was sent via the Microsoft Graph API."
  },
  "toRecipients": [
    {
      "emailAddress": {
        "address": "recipient@example.com"
      }
    }
  ]
}
},
});

List calendar events

GET https://graph.microsoft.com/v1.0/me/events?$top=10&$orderby=start/dateTime — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/events?$top=10&$orderby=start/dateTime', { method: 'GET' });

Create a calendar event

POST https://graph.microsoft.com/v1.0/me/events — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/events', {
  body: {
"subject": "Team Sync",
"start": {
  "dateTime": "2026-05-01T10:00:00",
  "timeZone": "UTC"
},
"end": {
  "dateTime": "2026-05-01T10:30:00",
  "timeZone": "UTC"
}
},
});

List files in OneDrive root

GET https://graph.microsoft.com/v1.0/me/drive/root/children — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/drive/root/children', { method: 'GET' });

List joined Teams

GET https://graph.microsoft.com/v1.0/me/joinedTeams — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/joinedTeams', { method: 'GET' });

Update a calendar event

PATCH https://graph.microsoft.com/v1.0/me/events/{event-id} — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/events/{event-id}', {
  method: 'PATCH',
  body: {
"subject": "Updated Meeting Title",
"start": {
  "dateTime": "2026-05-01T11:00:00",
  "timeZone": "UTC"
},
"end": {
  "dateTime": "2026-05-01T11:30:00",
  "timeZone": "UTC"
}
},
});

Upload or replace a file in OneDrive

PUT https://graph.microsoft.com/v1.0/me/drive/root:/{filename}:/content — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/drive/root:/{filename}:/content', { method: 'PUT' });

Delete a calendar event

DELETE https://graph.microsoft.com/v1.0/me/events/{event-id} — Free
const data = await lava.gateway('https://graph.microsoft.com/v1.0/me/events/{event-id}', { method: 'DELETE' });

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests