.png)
Microsoft Teams Integration Guide
Integrate Microsoft Teams with enterprise systems through Microsoft Graph REST APIs, selected change notifications, and Microsoft 365 file resources.
Microsoft Teams integration options at a glance
Microsoft Teams integrations are primarily built on Microsoft Graph REST APIs, which provide access to teams, channels, members, chats, messages, meetings, users, and related Microsoft 365 resources. Selected resources support Graph change notifications through HTTPS endpoints, while JSON batching can reduce request overhead. Teams files are accessed through SharePoint or OneDrive APIs, and selected resources may support delta queries for incremental synchronization. Microsoft Entra ID provides OAuth 2.0 delegated or application authentication. Martini can consume these APIs, receive supported notifications through an API endpoint, orchestrate workflows, map payloads, and apply retries, validation, and business rules.
| Integration point | Supported by Microsoft Teams? | Common use cases | How Martini supports it |
|---|---|---|---|
| Microsoft Graph REST APIs | Yes | Manage and retrieve teams, channels, members, chats, messages, online meetings, users, and related Microsoft 365 resources. Use v1.0 for generally available production capabilities where possible. | Martini can consume Microsoft Graph HTTPS endpoints from workflows, map JSON request and response data, apply business rules, and expose APIs for downstream consumers. |
| Webhooks / outbound callbacks | Limited | Microsoft Graph change notifications can notify subscribers about selected chat messages, channel messages, chats, memberships, and other supported resources. Coverage is resource-specific rather than universal. | Martini can expose an HTTPS API endpoint, validate subscription requests and notifications, retrieve the current resource, and process lifecycle or renewal events. |
| Bulk / async / batch APIs | Limited | Microsoft Graph JSON batching combines multiple Graph requests in one HTTP request and can reduce network overhead, but individual permissions, throttling, and service constraints still apply. | Martini workflows can construct and consume batch requests where appropriate and handle individual subrequest results, retries, and partial failures. |
| File / attachment APIs | Yes | Teams files are commonly stored in SharePoint or OneDrive and can be accessed through Microsoft Graph. Messages may also reference hosted content or files. | Martini can follow file references, call SharePoint or OneDrive Graph resources, transform metadata or content, and deliver it to an external repository or process. |
| Delta and incremental synchronization | Limited | Delta queries support incremental synchronization for selected Microsoft Graph resources. Support and token behavior vary by Teams resource. | Martini can persist delta links, process additions and deletions, handle expired tokens, and initiate a full resynchronization when required. |
| Authentication | Yes | Microsoft Graph uses Microsoft Entra ID OAuth 2.0 access tokens with delegated or application permissions, administrator consent, and resource-specific restrictions where applicable. | Martini can use secure environment configuration and secrets management for OAuth credentials and tokens, keeping them out of workflow payloads and logs. |
| SDKs | Yes | Microsoft Graph SDKs are available for several programming languages, but they are optional because the underlying REST APIs are the primary integration contract. | Martini can consume the HTTPS REST APIs directly and use custom JVM-compatible logic when API-specific processing requires it. |
| Database access | No | Microsoft Teams does not expose a direct relational database interface for application integration. | Martini should use Microsoft Graph, SharePoint or OneDrive APIs, change notifications, and supported Teams application interfaces instead of direct database access. |
How Microsoft Teams exposes data and business events
Microsoft Graph REST APIs
Microsoft Graph is the primary integration surface for Microsoft Teams. Its REST resources cover teams, channels, members, chats, messages, online meetings, users, files, and related Microsoft 365 data. Production integrations should prefer v1.0 resources when they provide the required capability, while beta resources should be isolated and treated as change-prone.
Martini implementation pattern
Martini implementation pattern: a workflow authenticates with Microsoft Entra ID, calls the required Graph endpoint, follows pagination or related-resource links, maps the JSON response into a canonical model, applies business rules, and writes to or calls the target system. Martini can also expose a controlled API façade over the resulting process.
Implementation sequence
Microsoft Graph change notifications
Microsoft Graph supports change-notification subscriptions for selected Teams and Microsoft 365 resources. Notifications may contain identifiers rather than complete resource state, and subscriptions have expiration, validation, permission, and lifecycle requirements.
Martini implementation pattern
Martini implementation pattern: expose a Martini API endpoint as the notification URL, return the validation token as required, validate incoming notifications, retrieve the changed resource from Graph, and process the current state. A scheduled workflow can renew subscriptions and recover from lifecycle failures.
Implementation sequence
Microsoft Graph JSON batching
Microsoft Graph JSON batching allows multiple requests to be submitted in a single HTTP request. It can reduce network overhead but does not remove individual permission checks, throttling, request limits, or partial-failure handling.
Martini implementation pattern
Martini implementation pattern: assemble independent Graph requests in a workflow, submit the batch, inspect each subresponse, route successful and failed operations separately, and retry only eligible transient failures rather than replaying the entire batch indiscriminately.
Implementation sequence
Microsoft Graph files and attachments
Teams files are commonly stored in SharePoint or OneDrive, while messages can contain hosted content or file references. File processing therefore crosses Teams, SharePoint, OneDrive, and Microsoft Graph resource boundaries.
Martini implementation pattern
Martini implementation pattern: identify the referenced drive, site, item, or hosted content resource, retrieve permitted metadata or content, transform it for the target system, and preserve the source identifiers and permissions context. Message processing and file retrieval should be treated as related but separate operations.
Implementation sequence
Microsoft Graph delta synchronization
Delta queries can support incremental synchronization for selected Graph resources, but coverage is not uniform across Teams objects. Delta links, deleted objects, token expiration, and full-resynchronization paths must be treated as synchronization state.
Martini implementation pattern
Martini implementation pattern: store the current delta link securely, call the delta endpoint on a schedule or after a notification, process additions and deletions, and replace the stored link only after successful downstream handling. When the token expires or coverage is insufficient, the workflow starts a controlled full synchronization.
Implementation sequence
Common Microsoft Teams integration patterns
Pattern 1: Send ServiceNow incidents to Teams
When to use this pattern
Use this pattern when operations teams need timely incident creation, assignment, escalation, or resolution notifications in a Teams channel. It is appropriate for event-driven delivery or scheduled reconciliation where the source does not provide a reliable event.
Integration direction
Example Mapping
| Microsoft Teams Field | Canonical Field | Target Field |
|---|---|---|
| number | incidentNumber | message.subject |
| short_description | summary | message.body |
| priority | severity | channel.routingKey |
| sys_id | sourceId | message.correlationKey |
Martini implementation pattern
Martini receives a ServiceNow event or retrieves changed incidents, enriches the payload with assignment and severity data, selects a Teams team and channel using business rules, and calls Microsoft Graph to create the message. The workflow stores the ServiceNow identifier and destination message correlation, uses bounded retries for Graph throttling, and routes permanent failures to exception handling.
Martini capabilities used
- workflows
- API consumption
- data mapping
- business rules
- error handling
- scheduled synchronization
Pattern 2: Publish Salesforce opportunity changes to Teams
When to use this pattern
Use this pattern when sales and account teams need collaboration updates without opening Salesforce for every change. It supports stage changes, ownership changes, and selected customer activity notifications.
Integration direction
Example Mapping
| Microsoft Teams Field | Canonical Field | Target Field |
|---|---|---|
| Id | opportunityId | message.correlationKey |
| Name | opportunityName | message.body.title |
| StageName | stage | message.body.stage |
| Amount | value | message.body.amount |
Martini implementation pattern
Martini consumes or polls Salesforce changes, applies thresholds and account-to-channel routing, maps approved fields into a Teams message, and calls Microsoft Graph. Correlation keys prevent duplicate posts, while failed deliveries are retried or sent to an exception path without losing the source change.
Martini capabilities used
- workflows
- API consumption
- data mapping
- business rules
- error handling
- reusable integration logic
Pattern 3: Route Jira issue updates to project channels
When to use this pattern
Use this pattern when development and delivery teams need issue, sprint, release, or blocker updates in the Teams channels associated with Jira projects.
Integration direction
Example Mapping
| Microsoft Teams Field | Canonical Field | Target Field |
|---|---|---|
| key | issueKey | message.subject |
| fields.summary | summary | message.body |
| fields.priority.name | priority | channel.routingKey |
| fields.status.name | status | message.body.status |
Martini implementation pattern
Martini receives Jira webhook-style events or runs a scheduled poll, normalizes issue data, routes by project, component, sprint, or priority, and formats a concise Graph channel message. It records the Jira issue key and event identity for idempotency and applies retry rules for transient Graph failures.
Martini capabilities used
- API consumption
- workflows
- data mapping
- conditional routing
- business rules
- error handling
Pattern 4: Archive selected Teams messages and files
When to use this pattern
Use this pattern when an organization must preserve selected channel messages, chat messages, hosted content, or referenced files in an archive or records platform.
Integration direction
Example Mapping
| Microsoft Teams Field | Canonical Field | Target Field |
|---|---|---|
| id | messageId | archive.sourceMessageId |
| createdDateTime | createdAt | archive.createdAt |
| from | author | archive.author |
| hostedContents | contentReferences | archive.attachments |
Martini implementation pattern
A Martini API receives a supported Graph change notification, validates it, retrieves the current message, follows SharePoint or OneDrive references where permitted, and maps message metadata and content to the archive. Duplicate notifications are suppressed using message and subscription identifiers, while expired subscriptions and retrieval errors are handled through renewal and retry workflows.
Martini capabilities used
- API exposure
- webhook handling
- API consumption
- data mapping
- scheduled workflows
- error handling
Applications commonly integrated with Microsoft Teams
Microsoft Teams commonly participates in collaboration, service management, sales, development, support, HR, content, and analytics workflows. The following applications can be integrated with Teams through their APIs, events, files, or Microsoft Graph resources, with Martini coordinating authentication, routing, transformation, and error handling.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| ServiceNow | Send incident, change, request, and approval notifications to Teams channels and provide links back to operational workflows. | ServiceNow → Martini → Microsoft Teams | Consume ServiceNow events or scheduled results, map incident and change fields into Microsoft Graph channel-message requests, route by severity or assignment group, and use the ServiceNow identifier to prevent duplicate posts. |
| Salesforce | Notify sales and account teams about opportunity stages, ownership changes, and important customer activity. | Salesforce → Martini → Microsoft Teams | Receive or retrieve Salesforce changes, enrich the payload with account and owner data, select the target team or channel using business rules, and call Microsoft Graph with bounded retries and correlation tracking. |
| Jira | Surface issue creation, priority changes, sprint updates, and release blockers in project collaboration channels. | Jira → Martini → Microsoft Teams | Consume Jira webhook notifications or poll for updates, transform issue and sprint fields into Teams message content, route by project or priority, and optionally expose an API for controlled Jira updates. |
| Zendesk | Deliver support ticket assignments, escalations, and SLA notifications to authorized Teams channels. | Zendesk → Martini → Microsoft Teams | Receive Zendesk events or query ticket changes, apply routing and data-minimization rules, format the ticket summary for Teams, and record the ticket ID and message correlation key for idempotency. |
| Workday | Share selected HR workflow notifications or approvals with authorized Teams users while limiting sensitive employee data. | Workday → Martini → Microsoft Teams | Retrieve approved Workday events or workflow results, validate recipient and data classification rules, map only permitted fields to a Teams message or link, and retain audit metadata without exposing unnecessary HR content. |
| SharePoint | Access files associated with Teams channels and synchronize selected document metadata or content with external systems. | Microsoft Teams → Martini → SharePoint | Process a Teams or Graph notification, resolve the associated SharePoint site, drive, and item, retrieve permitted metadata or content, and map it to the downstream repository with duplicate detection. |
| OneDrive | Retrieve or synchronize files referenced in Teams chats and personal collaboration contexts. | Microsoft Teams → Martini → OneDrive | Follow Graph file references from message or chat payloads, authenticate against the relevant OneDrive resource, transform metadata and content as required, and handle permission failures separately from transient API errors. |
| Power BI | Share report links, alerts, or selected analytical notifications in Teams channels. | Power BI → Martini → Microsoft Teams | Receive or retrieve Power BI notification data, apply audience and routing rules, create a concise Teams message containing approved report links, and log the source event for traceability. |
How to build a Microsoft Teams integration in Martini
Objective
Establish Microsoft Graph access using Microsoft Entra ID and the minimum delegated or application permissions required for the selected Teams resources.
Instructions in Martini
- Configure the Graph base URL and API version appropriate to the use case
- Select delegated or application-only OAuth 2.0 access
- Store client credentials and secrets in secure Martini environment configuration
- Obtain administrator or resource-specific consent where required
Objective
Select an event-driven or scheduled trigger based on the resource coverage and reliability required by the integration.
Instructions in Martini
- Use a Martini API endpoint for supported Graph change notifications
- Use a scheduler for reconciliation, subscription renewal, or resources without notification coverage
- Use delta queries where the target Graph resource supports them
- Define a full-resynchronization path for expired or invalid synchronization state
Objective
Receive the notification or source event and retrieve authoritative resource state from Microsoft Graph rather than assuming the notification contains a complete payload.
Instructions in Martini
- Validate Graph subscription requests and incoming notifications
- Call the relevant Graph resource after identifying the changed object
- Follow @odata.nextLink for paginated collections
- Resolve SharePoint or OneDrive references for Teams files
Objective
Coordinate source processing, Graph calls, target writes, routing, and state management in a maintainable Martini workflow.
Instructions in Martini
- Separate notification intake from follow-up retrieval where appropriate
- Use reusable workflow logic for authentication, correlation, and resource retrieval
- Route messages by team, channel, severity, project, or permission-aware business rules
- Persist delta links, subscription state, and external correlation identifiers
Objective
Convert Teams and Microsoft Graph payloads into a canonical model or target-specific request while accounting for rich content and related resources.
Instructions in Martini
- Map teams, channels, chats, messages, members, meetings, and file references explicitly
- Normalize HTML, mentions, links, hosted content, and timestamps for the target
- Apply validation before writing data downstream
- Use custom logic only where standard mapping and transformation are insufficient
Objective
Enforce routing, privacy, retention, permission, and idempotency rules before performing downstream actions.
Instructions in Martini
- Restrict message and file content to approved recipients and destinations
- Use stable team, channel, chat, message, subscription, or source identifiers for duplicate detection
- Prefer v1.0 Graph resources for production when they meet requirements
- Classify permission failures separately from transient service failures
Common Microsoft Teams data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| Teams | Represent collaboration workspaces containing channels, members, tabs, apps, and settings. | ServiceNow, Salesforce, Jira, SharePoint, enterprise archives | Martini retrieves or updates Teams through Microsoft Graph, maps identifiers and membership data, and applies permission-aware routing and error handling. |
| Channels | Organize team collaboration and provide destinations for operational, project, and notification messages. | ServiceNow, Salesforce, Jira, Zendesk, records platforms | Martini resolves team and channel identifiers, applies routing rules, constructs Graph message payloads, and tracks posted message correlations. |
| Chat messages | Represent messages in one-to-one, group, or meeting-related chats, including content and references. | Enterprise archives, compliance platforms, SharePoint, analytics stores | Martini processes notifications or retrieved messages, normalizes HTML and metadata, follows hosted-content or file references, and prevents duplicate archival. |
| Chats | Represent one-to-one, group, or meeting-related conversations and their participants. | Enterprise archives, customer systems, compliance platforms | Martini retrieves supported chat data through Graph, validates permissions and retention rules, and maps participants and message relationships to the target model. |
| Team members | Represent users, guests, or other directory principals associated with a team. | Identity directories, HR systems, access governance platforms | Martini synchronizes supported membership data, maps Microsoft Entra identifiers, and applies least-privilege and privacy rules before writing downstream. |
| Online meetings | Represent scheduled or ad hoc Teams meetings and associated meeting resources. | Calendars, service platforms, archives, workflow systems | Martini calls supported Graph meeting resources, maps meeting metadata and links, and handles resource-specific permission and notification limitations. |
Authentication and security considerations
Microsoft Entra ID and Microsoft Graph permissions
Microsoft Teams integrations use Microsoft Graph access tokens issued by Microsoft Entra ID. Martini workflows may use delegated OAuth 2.0 access for user-context operations or application permissions for supported application-only operations.
- Request only the Graph permissions required for the selected teams, channels, messages, chats, files, users, or meetings.
- Plan for administrator consent and resource-specific consent where required.
- Keep client credentials, tokens, and subscription data in secure Martini environment configuration or secrets-management facilities.
- Do not log access tokens or unnecessary message and file content.
Cross-service authorization
Teams files commonly reside in SharePoint or OneDrive, so an integration may require permissions across multiple Microsoft 365 resources. Validate the storage location and permission context before retrieving content.
Operational considerations for Microsoft Teams integrations
Throttling, pagination, and retries
Microsoft Graph applies throttling and collection responses may contain an @odata.nextLink reference. Workflows should follow pagination, honor Retry-After when supplied, and use bounded exponential backoff for transient failures.
- Inspect individual results when using JSON batching because subrequests can fail independently.
- Use stable identifiers such as message, chat, channel, team, subscription, and source IDs for idempotency.
- Persist delta links only after successful downstream processing and support token expiration or full resynchronization.
- Renew Graph subscriptions before expiration and handle validation and lifecycle notifications.
- Test rich message content, mentions, hosted content, file references, permissions, and both v1.0 and any required beta resources separately.
Schema and service boundaries
Teams integrations can cross Microsoft Graph, SharePoint, OneDrive, Exchange, Microsoft Entra ID, and Microsoft 365 groups. Isolate Graph-specific mappings and prefer stable v1.0 contracts for production integrations.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration beyond a single script
Martini separates notification intake, resource retrieval, transformation, business rules, target writes, and exception handling into maintainable workflows. This is useful when a Teams process spans Microsoft Graph, SharePoint, OneDrive, and other enterprise applications.
- Expose reusable APIs and receive supported Graph change notifications.
- Coordinate real-time, scheduled, batch, and reconciliation workflows.
- Apply consistent mappings, validation, routing, idempotency, and retry policies.
- Keep authentication and secrets outside workflow payloads.
- Monitor processing and preserve correlation information for troubleshooting without creating tightly coupled point-to-point scripts.
Frequently asked questions
Microsoft Teams is integrated primarily through Microsoft Graph REST APIs. Graph provides access to teams, channels, members, chats, messages, online meetings, users, and related SharePoint or OneDrive resources. Selected resources support change notifications, while scheduled synchronization, JSON batching, and delta queries can support other integration scenarios.
Yes. Martini can consume Microsoft Graph REST APIs, authenticate through Microsoft Entra ID, expose an API endpoint for supported Graph change notifications, retrieve related SharePoint or OneDrive resources, and orchestrate mappings, business rules, retries, and downstream writes.
No. A dedicated Microsoft Teams connector is not required. Martini can use Microsoft Graph REST APIs, supported Graph change notifications, SharePoint and OneDrive file APIs, and Microsoft Entra ID authentication to implement the integration.
Lonti does not charge an additional per-connector or per-vendor fee to integrate Microsoft Teams. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Microsoft, Azure, Microsoft 365, cloud infrastructure, or other third-party systems depending on licensing, usage, and deployment model.
Microsoft Graph REST APIs are the primary method. Use v1.0 resources for production where possible, selected change notifications for supported event scenarios, delta queries for supported incremental resources, JSON batching when appropriate, and SharePoint or OneDrive APIs for Teams files. Graph SDKs are optional because Martini can consume the REST APIs directly.
Microsoft Graph change notifications are available for selected resources and operations, but they are not a universal event stream for every Teams action. Subscriptions have expiration, validation, permission, and lifecycle requirements, so integrations should combine notifications with follow-up Graph reads, scheduled reconciliation, or delta synchronization where needed.
Martini can retrieve paginated Graph collections, process supported delta queries, store synchronization links, and map Teams objects into canonical or target-specific models. Workflows can normalize message content, follow file references into SharePoint or OneDrive, apply routing and privacy rules, and write results to downstream systems.
Yes. Martini can expose a controlled REST API that accepts requests from enterprise applications, applies authorization and business rules, and orchestrates Microsoft Graph calls. This can provide a stable internal contract while isolating consumers from Graph-specific permissions, payloads, throttling, and API-version changes.
Related Martini documentation
Microsoft Graph
Workflows
Reliability
Connect Microsoft Teams to your enterprise workflows
Use Martini to build maintainable Microsoft Teams integrations around Microsoft Graph, supported change notifications, Microsoft 365 file resources, and secure enterprise workflows.