Microsoft 365 components
If you installed lfx directly (not as part of langflow), install the Microsoft 365 bundle separately:
- Run
uv pip install lfx-microsoft. - Restart Langflow.
- To confirm the bundle loaded, run
lfx extension list.
If you installed Langflow with uv pip install langflow, these bundle components are already included.
For more information, see Install LFX with bundle components.
Bundles contain custom components that support specific third-party integrations with Langflow.
This page describes the components available in the Microsoft 365 bundle. Every component calls Microsoft Graph v1.0 with delegated permissions, acting as the signed-in user. Application (app-only) permissions are not used by any component in this bundle.
Connect a Microsoft account
Each component has a Microsoft Connection field that holds a portable connection handle such as microsoft/work. The handle is not a credential: it names a connection that the Langflow server resolves to a short-lived Graph access token at run time, and it is safe to keep in an exported flow.
Before a component can run:
- An operator registers a Microsoft Entra application with Langflow. See Configure Langflow for Microsoft Entra and Configure connection OAuth.
- A user connects their Microsoft account in Settings, granting the delegated permissions the selected actions need. See Connections.
- The user selects that connection in the component's Microsoft Connection field.
The connection must grant the permissions listed for the action. Missing permissions fail the run with a scope-missing error before any request reaches Microsoft, so a component never sends a call it knows will be refused.
Headless and CLI runs
For headless runs (lfx run), supply the credential in the environment variable named after the handle. microsoft/work reads LF_CONNECTION__MICROSOFT__WORK:
export LF_CONNECTION__MICROSOFT__WORK='{"access_token":"<delegated access token>","scopes":["Mail.Read"]}'
Use short permission names such as Mail.Read; execution checks also accept the equivalent fully qualified Microsoft Graph names. Do not include offline_access: Entra never echoes it, and it belongs to the OAuth registration rather than to an action.
The JSON form accepts only access_token, token_type, expires_at, scopes, and account. Refresh tokens and client secrets are rejected. A bare token lacks verified scope metadata and cannot run these permission-scoped actions. Use the JSON form with the token's granted permissions.
Microsoft 365 source triggers
Add Outlook: On Message, Outlook: On Calendar Event, or OneDrive or SharePoint: On File at the start of a Flow. Save the Flow, then enable its trigger through the Triggers API. The connection must belong to the Flow owner and have Allow background runs enabled. The trigger uses the owner's delegated credential; a shared or instance connection cannot arm it.
| Trigger | Delegated scopes | Changes observed |
|---|---|---|
| Outlook: On Message | Mail.Read | Messages in the owner's Inbox |
| Outlook: On Calendar Event | Calendars.Read | Events in a rolling calendar window |
| OneDrive or SharePoint: On File | Files.Read; add Files.Read.All and Sites.Read.All when SharePoint Site ID is set | Files in the owner's drive or selected site's default drive |
In advanced Delivery Mode, auto chooses a Graph notification subscription when ingress is enabled and the OAuth registration advertises a public HTTPS callback; otherwise it uses Graph delta polling. Select poll to use a listener even when ingress is enabled, or push to require push configuration. Hosted deployments require push. Notifications only wake a delta scan; the Flow receives the changed item. Langflow stores the item version and delta cursor together, renews subscriptions, and schedules backup scans after five minutes to recover missed notifications. Backlog and provider delays can extend this interval. Enabling starts from the current state, so existing items do not fire the Flow.
The Graph subscription callback uses the public origin of the connection's OAuth registration. That registration must have an HTTPS redirect URI reachable by Graph. GET /api/v1/triggers/{trigger_id}/ingress shows the exact callback after saving a configured push source, before enabling it. If Graph expires a delta cursor, Langflow compares a fresh snapshot with stored item versions before resuming.
Components
Listing actions return complete pages until they reach Result Budget. The final page can take the count above that budget. Next Link resumes after the returned rows; both outputs share one listing per run.
Outlook: Send Mail
Sends a message as the connected user through POST /me/sendMail.
- Delegated permission:
Mail.Send - Inputs: To, Cc, Bcc, Subject, Body, Body is HTML, Attachments, Save to Sent Items
- Output: Result — Graph answers
202 Acceptedwith no body, so the output carries the accepted request and the status code.
Attachments are uploaded inline as Graph fileAttachment entries, with a 3 MiB raw attachment budget and a 4 MiB limit on the complete encoded request. Larger files need an upload session or a shared link. File reads honor the deployment's local-file access restrictions.
Outlook: Search Mail
Lists or searches the connected user's mailbox through GET /me/messages.
- Delegated permission:
Mail.Read - Inputs: Search (
$search), Filter ($filter), Mail Folder ID, Result Budget, Select Fields, Include Body - Outputs: Messages (one
Dataper message) and Next Link (the@odata.nextLinkthat was not followed)
Graph rejects $search combined with $filter; use one or the other. Include Body asks Graph for plain-text bodies through the Prefer: outlook.body-content-type=text header.
Outlook Calendar: List Events
Lists events in a time window through GET /me/calendarView, with recurring series expanded into instances.
- Delegated permission:
Calendars.Read - Inputs: Start, End (ISO 8601, both required), Calendar ID, Result Budget, Select Fields, Time Zone
- Outputs: Events and Next Link
Time Zone sets the Prefer: outlook.timezone header, so returned times use the zone you name rather than UTC.
Outlook Calendar: Create Event
Creates an event through POST /me/events.
- Delegated permission:
Calendars.ReadWrite - Inputs: Subject, Start, End, Time Zone, Body, Location, Attendees, Online Meeting, Recurrence, Calendar ID, Transaction ID
- Output: Event — the created Graph event resource
Set Transaction ID to a value you generate to make a retried create idempotent: Microsoft ignores a repeat with the same transaction id for a period after the first call.
Teams: Post Chat Message
Posts into an existing chat through POST /chats/{chat-id}/messages.
- Delegated permission:
ChatMessage.Send - Inputs: Chat ID, Message, Content Type (
textorhtml), Mentions, Attachments - Output: Message — the created
chatMessage
This action posts into a chat that already exists; it cannot create one. Microsoft Graph does not support this action for personal Microsoft accounts.
Teams: Post Channel Message
Posts into a channel through POST /teams/{team-id}/channels/{channel-id}/messages.
- Delegated permission:
ChannelMessage.Send - Inputs: Team ID, Channel ID, Message, Content Type, Mentions, Attachments
- Output: Message — the created
chatMessage, including itswebUrl
Personal Microsoft accounts are not supported.
SharePoint/OneDrive: List Items
Lists the children of a folder through GET .../children.
- Delegated permission:
Files.Read, plusFiles.Read.Allwhen you supply a Drive ID andSites.Read.Allwhen you supply a Site ID - Inputs: Drive ID, Site ID, Folder Item ID, Folder Path, Result Budget, Select Fields, Order By
- Outputs: Items (one
DataperdriveItem) and Next Link
With neither a drive nor a site id, the component lists the connected user's own OneDrive. A drive id takes precedence over a site id.
SharePoint/OneDrive: Fetch Item
Fetches one file's metadata and content through GET .../content.
- Delegated permission:
Files.Read, plusFiles.Read.AllorSites.Read.Allas above - Inputs: Item ID or Item Path (one is required), Drive ID, Site ID, Byte Range, Max Bytes
- Output: File —
driveItemmetadata pluscontent_base64,content_bytes,truncated, andtextwhen the bytes decode as UTF-8
Max Bytes must be positive and is capped at 25 MiB. The component checks one extra byte so truncated is true only when bytes were discarded.
Graph answers a content request with a redirect to a short-lived, preauthenticated download URL. Langflow follows that redirect without the access token and never returns, stores, or logs the URL, because the URL is itself a credential for anyone who holds it.
Knowledge base ingestion
The same Microsoft connection also backs two knowledge-base ingestion sources,
OneDrive and SharePoint. They appear in the knowledge base's connector
picker and take the connection handle in their connection setting rather than
a refresh token stored in a Langflow variable.
| Setting | OneDrive | SharePoint |
|---|---|---|
connection | required, microsoft/<name> | required, microsoft/<name> |
site_id | not used | required (unless drive_id is given) |
drive_id | optional; another user's or a shared drive | optional; a specific library |
folder_path / item_id | optional starting folder | optional starting folder |
recursive | default true | default true |
max_items | default 5000 | default 5000 |
Permissions follow the configuration: the signed-in user's own OneDrive needs
Files.Read, an explicit drive id also needs Files.Read.All, and a SharePoint
site library needs Sites.Read.All.
Ingestion runs in the background, detached from the request that started it, so Langflow resolves the connection as a non-interactive job owner. A connection that has not been marked as usable without an interactive user is refused before any Graph call is made, and the run fails with a connection-not-authorized error rather than silently ingesting nothing.
Error behavior
Every action maps Graph failures onto the stable, sanitized error vocabulary:
auth-expired when the token is rejected (retried once against a freshly minted
token before surfacing), scope-missing for an explicit missing-permission
code, connection-not-authorized for other 403 denials, action-unsupported
for 404, 405, and 501, rate-limited for 429 and 503, and
provider-unavailable for request timeouts and server failures. Any other
4xx is invalid-request, which is not retryable: change the inputs or the
account setup first. A workload the tenant or user is not licensed for, and a
mailbox Exchange Online cannot serve, also surface as invalid-request, with a
hint naming the Microsoft 365 license to assign. See the
Entra registration prerequisites.
Graph response bodies are never passed through verbatim.
Rate limits
Microsoft throttles per service and returns 429 (or 503) with a Retry-After header. The components surface that as a rate-limited error carrying the retry interval; they do not retry on your behalf.
- Outlook: 10,000 requests per 10 minutes and 4 concurrent requests per app per mailbox.
- Teams: 1 request per second per chat and per channel, with higher per-app and per-tenant ceilings.
- SharePoint and OneDrive: resource-unit budgets, roughly 3,000 requests per 5 minutes per user.
For the authoritative numbers, see Microsoft Graph throttling limits.
Limitations
- Only delegated permissions are used. Sending mail as another mailbox, or reading a tenant's data without a signed-in user, requires application permissions and is out of scope for this bundle.
- The connection broker uses a fixed-tenant authority, so a registration serves one Entra tenant. Personal Microsoft accounts and multi-tenant registrations are not supported yet.
- Teams chat and channel posts are unavailable to personal Microsoft accounts even within a supported registration.
Was this page helpful?