REST API for synchronizing Microsoft 365 data (Mail, Calendar, Contacts, To Do, Planner) via Microsoft Graph API with delta sync support.
Searches across Users, Messages, Calendar Events, Contacts, and Planner Tasks in parallel. Returns grouped results limited per entity.
| Name | Type | Description |
|---|---|---|
| q required | string | Search term (matched via LIKE against entity fields) |
| limit optional | integer | Max results per entity (default: 5, max: 20) |
Redirects the user to Microsoft's OAuth 2.0 authorization endpoint. After login, Microsoft redirects back to /auth/callback.
| Name | Type | Description |
|---|---|---|
| state optional | string | Opaque value for CSRF protection |
302 Redirect to Microsoft login page
Handles the OAuth 2.0 callback from Microsoft. Exchanges the authorization code for tokens, creates/updates the user in the database, and stores tokens.
Returns the current authentication/token status for a user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Soft-deletes the stored tokens for a user (marks them inactive).
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns all Microsoft 365 users that have been synced to the local database.
Returns complete profile for a single user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Searches for a user by email in the local database. If not found, fetches the user from Microsoft Graph API and saves them locally. Returns the user with a source field indicating where the data came from.
| Name | Type | Description |
|---|---|---|
| email required | string | Email address or UserPrincipalName |
Triggers a full sync for all registered users. Syncs mail, calendar, contacts, and to-do for each user.
Triggers a full sync of all entities (mail, calendar, contacts, todo) for a single user. Uses delta links if available.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Triggers sync for a specific entity type for a user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| entity required | string | Entity type: mail, calendar, contacts, todo |
Returns the sync status for each entity type, including last sync timestamp and whether a delta link exists.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Deletes the stored delta link for a specific entity. The next sync will be a full sync instead of an incremental delta sync.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| entity required | string | Entity type: messages, events, contacts, todoTasks |
Discovers all users from Azure AD using app-only (Client Credentials) flow. No user OAuth required. Creates/updates user records in the local database.
Discovers users and syncs all contacts using app-only flow. No user OAuth required.
Returns all synced mail folders for a user (Inbox, Sent Items, Drafts, etc.).
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns synced messages for a user with optional filtering and pagination.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| Name | Type | Description |
|---|---|---|
| folderId optional | string | Filter by folder Graph ID |
| isRead optional | boolean | Filter by read status |
| offset optional | integer | Pagination offset (default: 0) |
| limit optional | integer | Page size (default: 50) |
Returns a single message with its recipients (To, Cc, Bcc).
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Message Graph ID |
Returns all attachments for a specific message.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Message Graph ID |
Sends a new email via Microsoft Graph on behalf of the user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Sends a reply to an existing message.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Message Graph ID |
Forwards an existing message to new recipients.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Message Graph ID |
Updates message properties like read status or importance via Microsoft Graph.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Message Graph ID |
Returns all synced calendars for a user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns synced calendar events with optional date range filtering and pagination.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| Name | Type | Description |
|---|---|---|
| start optional | date | Start date filter (ISO format) |
| end optional | date | End date filter (ISO format) |
| offset optional | integer | Pagination offset (default: 0) |
| limit optional | integer | Page size (default: 50) |
Returns a single event with its attendees list.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Event Graph ID |
Creates a new calendar event via Microsoft Graph, with optional attendees.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns all synced contact folders for a user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns synced contacts with optional search and pagination.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| Name | Type | Description |
|---|---|---|
| search optional | string | Search by name or email |
| offset optional | integer | Pagination offset (default: 0) |
| limit optional | integer | Page size (default: 50) |
Returns a single contact with their email addresses and phone numbers.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Contact Graph ID |
Creates a new contact in the user's default contact folder via Microsoft Graph.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Generates a professional AI summary of the relationship with a contact based on recent emails, calendar events, and Planner tasks. Uses Claude CLI for the AI generation.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Contact Graph ID |
Returns all synced To Do task lists for a user.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
Returns tasks within a specific task list with optional status filtering.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| listId required | string | Task list Graph ID |
| Name | Type | Description |
|---|---|---|
| status optional | string | Filter: notStarted, inProgress, completed |
| offset optional | integer | Pagination offset (default: 0) |
| limit optional | integer | Page size (default: 50) |
Returns a single task with its checklist items and linked resources.
| Name | Type | Description |
|---|---|---|
| userId required | string | Graph user ID |
| graphId required | string | Task Graph ID |
Returns all synced M365 Unified Groups from the tenant. Planner plans belong to groups.
Returns all plans belonging to a specific M365 group.
| Name | Type | Description |
|---|---|---|
| groupId required | string | M365 Group Graph ID |
Returns all synced plans, optionally filtered by group.
| Name | Type | Description |
|---|---|---|
| groupId optional | string | Filter by M365 Group Graph ID |
Returns all buckets (columns) in a plan, ordered by their order hint.
| Name | Type | Description |
|---|---|---|
| planId required | string | Plan Graph ID |
Returns tasks in a plan with optional filtering by bucket and completion status.
| Name | Type | Description |
|---|---|---|
| planId required | string | Plan Graph ID |
| Name | Type | Description |
|---|---|---|
| bucketId optional | string | Filter by bucket Graph ID |
| status optional | string | Filter: notStarted, inProgress, completed |
| offset optional | integer | Pagination offset (default: 0) |
| limit optional | integer | Page size (default: 50) |
Returns a single Planner task with its assignments and checklist items.
| Name | Type | Description |
|---|---|---|
| taskId required | string | Task Graph ID |
Updates a Planner task's status (percentComplete) or assignees via Microsoft Graph. Requires the task's ETag for concurrency control (fetched automatically).
| Name | Type | Description |
|---|---|---|
| taskId required | string | Task Graph ID |
Creates a new task in a Planner plan, optionally assigning it to a bucket and users.
Triggers a full sync of all Planner data: M365 Groups, Plans, Buckets, Tasks (with assignments and checklist items). Uses app-only (Client Credentials) flow — no user OAuth required. Planner does not support delta sync.
Returns all active Graph webhook subscriptions. Optionally filter by user.
| Name | Type | Description |
|---|---|---|
| userId optional | string | Filter subscriptions by user ID |
Creates Graph webhook subscriptions for all resource types (mail, calendar, contacts, chat messages) for one or all users. Automatically starts an ngrok tunnel if no webhook URL is configured. Existing subscriptions are renewed instead of duplicated.
Creates subscriptions for a specific resource type only.
| Name | Type | Description |
|---|---|---|
| resourceType required | string | One of: mail, calendar, contacts, chatMessages |
Extends the expiration of all active subscriptions by 2 days. Expired subscriptions that fail renewal are automatically cleaned up.
Deletes a subscription from both Microsoft Graph and the local database.
| Name | Type | Description |
|---|---|---|
| subscriptionId required | string | Graph subscription ID |
Deletes all subscriptions from Graph and the local database. Optionally filter by user.
| Name | Type | Description |
|---|---|---|
| userId optional | string | Delete only subscriptions for this user |
Returns the currently configured webhook notification URL and its source (custom or ngrok).
Configures a custom HTTPS webhook URL. Send null to clear and fall back to ngrok auto-tunnel.
Returns the current state of the ngrok HTTPS tunnel and configured webhook URL.
Webhook endpoint called by Microsoft Graph when subscribed resources change. Handles both the initial validation handshake (returns validationToken) and incoming change notifications. Do not call this directly — it is invoked by Microsoft.