ml-connector
SAP S/4HANAMicrosoft Teams

SAP S/4HANA and Microsoft Teams integration

SAP S/4HANA runs your procurement and general ledger. Microsoft Teams connects your team. When you need procurement approvals, purchase orders, or invoice alerts visible in the tools your team already uses, SAP S/4HANA and Teams working together keep stakeholders informed without switching windows. ml-connector handles the translation between SAPs OData procurement data and Teams channel messages, and manages the OAuth handshakes on both sides.

How SAP S/4HANA works

SAP S/4HANA exposes purchase orders, purchase requisitions, suppliers, invoices, GL accounts, and cost centers through OData V2 and OData V4 REST APIs on a tenant-specific base URL. Authentication uses OAuth 2.0 Client Credentials, with scopes defined in the Communication Arrangement. Tokens are short-lived and require refresh before expiry. SAP S/4HANA has no native webhooks, so records are read by polling with filters on LastChangeDateTime or using delta tokens for initial synchronization. On-Premise deployments require the sap-client query parameter, while Cloud Public Edition does not.

How Microsoft Teams works

Microsoft Teams is a collaboration platform accessed through the Microsoft Graph REST API. Teams exposes channels, messages, users, and team hierarchy. Authentication uses OAuth 2.0 with Microsoft Entra ID via the Client Credentials flow. Teams supports webhooks through Microsoft Graph change notifications, allowing subscriptions to be registered on resources such as channels and messages. Subscriptions expire after 3 days and must be renewed. Teams is a communications-only platform with no native ERP objects such as invoices, purchase orders, general ledger entries, or vendor data.

What moves between them

Purchase orders and invoices flow from SAP S/4HANA into Microsoft Teams channels. Approval requests, status alerts, and policy exceptions surface as formatted messages in designated approval or finance channels, typically after each polling cycle or in response to a cost threshold. Because Teams is read-mostly for structured ERP data, the flow is unidirectional: SAP S/4HANA pushes notifications and approval alerts into Teams, but approvals are captured either in Teams as simple acknowledgments or returned to SAP through a separate flow.

How ml-connector handles it

ml-connector polls SAP S/4HANA for purchase orders and invoices on a configurable schedule, parsing the OData response to extract supplier name, amount, cost center, and requested approval level. For each new or modified record that meets approval criteria, it formats a Teams message with the key details and posts it to the mapped channel. Microsoft Entra ID OAuth tokens are refreshed automatically before expiry. Teams subscriptions are created for the channels used and renewed before they expire. Because SAP S/4HANAs OData GL Account and Cost Center APIs are read-only, cost center validation happens at message composition time, and users approve through a Teams adaptive card or thread response. Supplier and cost center mappings are configured once per customer and do not require schema changes. All messages are logged with a full audit trail so replay is possible if a notification delivery fails.

A real-world example

A mid-sized manufacturing company uses SAP S/4HANA for procurement and GL management across three plants and needs approval workflows visible in Microsoft Teams where the procurement and finance teams already collaborate. Previously, each purchase order required an email alert and manual review of the SAP portal. With SAP S/4HANA and Teams connected, new purchase orders above a cost threshold appear automatically in a finance-approval channel as formatted messages with key details, stakeholders see and acknowledge the order in the same place they discuss projects, and the approval trail stays in Teams. Manual email tracking is gone, and approvals are visible to the whole team at once.

What you can do

  • Route purchase orders from SAP S/4HANA to Teams channels based on cost threshold or cost center.
  • Format purchase requisitions and invoices as Teams adaptive cards with supplier, amount, and cost center visible at a glance.
  • Validate cost centers against SAP S/4HANA GL Account and Cost Center master data before posting.
  • Manage OAuth 2.0 credentials for both SAP S/4HANA and Microsoft Entra ID, with automatic token refresh.
  • Poll SAP S/4HANA on schedule and renew Teams subscriptions to maintain reliable message delivery.

Questions

Can Microsoft Teams store and search SAP S/4HANA procurement data directly?
No. Teams is a communications and collaboration platform, not a data warehouse. ml-connector posts formatted messages to Teams channels so approvals are visible in context, but the source data remains in SAP S/4HANA. Teams serves as the notification and approval surface, not a replica of procurement records.
How does ml-connector handle approval sign-off in Teams?
Teams adaptive cards can include action buttons that users click to acknowledge or approve an order. Those responses are logged with a timestamp and user ID in the audit trail. If the approval needs to write back to SAP S/4HANA, a separate return flow posts the approval status to SAP via the OData API using the same OAuth connection.
What happens if a Teams subscription expires?
Microsoft Graph subscriptions expire after 3 days and must be renewed. ml-connector tracks expiry times and renews subscriptions before they lapse so messages continue to post uninterrupted. If a subscription is missed, the audit log captures the gap and alerts can be sent to retry the renewal.

Related integrations

Connect SAP S/4HANA and Microsoft Teams

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started