How to connect Microsoft Teams to Infor XA
Short answer
Build a Teams bot or workflow that receives XA events from a gateway sitting next to your IBM i, posts adaptive cards for approvals and alerts, and maps the Entra ID user to an XA user before calling a stored procedure to post the result. Teams never talks to the IBM i directly.
Teams is where many Infor XA companies already run their daily meetings, so it is a natural place to surface XA exceptions. The people who need the alerts, planners, buyers and supervisors, are usually the people who already sit in Teams all day and open the 5250 session only when something goes wrong.
The pattern is different from a consumer messaging channel. Teams gives you corporate identity through Entra ID, channel-level access control and rich adaptive cards, which makes it better suited to approvals and exception work than to customer-facing notifications.
XA itself needs no change. What you add is an event source on the IBM i side, a service that speaks the Bot Framework or Teams workflow protocols, and an identity map that ties a Teams user to an XA user profile.
What teams use it for
MRP exception channel
Post a daily card in a planners channel with the top action messages (reschedule in, cancel, past due) with a link to the item and a button to assign it to a planner.
Requisition and PO approvals
An adaptive card shows the vendor, total and budget line, and records Approve or Reject under the approver's Entra identity.
Quality hold notifications
When a lot is placed on hold, alert the quality channel with the part, lot and location, and let them acknowledge ownership.
Month-end close checklist
Finance gets a thread that tracks open batches and unposted journals from XA with a nudge when an item sits too long.
Ask-XA bot for read-only questions
Planners ask for an item's on-hand, open orders or next receipt, answered from read-only views with the SQL shown.
Infor XA (on IBM i) integration surface
- Db2 for i via JDBC (JTOpen) or ODBC for reads. Create read-only SQL views for the Teams service so it never queries base files directly. Field names differ between XA releases and local mods.
- Triggers or journal reading for change events, or a scheduled SQL job that selects exceptions and writes them to an outbox table.
- Stored procedures that wrap supported XA programs for approvals and status changes, so business rules still run.
- IBM i user profiles and XA user security. You need a mapping table from Entra ID user principal name to the XA user, because the two directories are separate.
- On many sites there is a job scheduler (WRKJOBSCDE or a third-party scheduler) that can run the extraction jobs on the IBM i side.
How it works
- 1
Decide bot versus workflow
Use a Power Automate or Teams workflow for simple one-way channel posts. Use a bot built on the Bot Framework when you need button callbacks and two-way logic.
- 2
Register the app in Entra ID
Create the app registration, restrict it to your tenant, and publish the bot to your organisation through the Teams admin centre rather than the public store.
- 3
Create the outbox
Build an outbox table in Db2 for i. XA-side triggers or a scheduled SQL job insert rows for events. A gateway reads and marks them sent.
- 4
Map identities
Create a table mapping each Entra user to an XA user. If a Teams user has no mapping, the bot refuses any action and says so.
- 5
Design adaptive cards
One card per event type, kept small. Include the XA key, a plain-text summary, and Approve, Reject or Assign buttons whose payloads carry the request ID.
- 6
Process card actions
When a button fires, re-check state in XA, call the stored procedure with the mapped XA user, and update the card to show the outcome.
Example flows
Late-supply alert to the buyer channel
Trigger: A scheduled SQL job finds PO lines more than three days past due with production demand.
- The job writes one outbox row per supplier with the late lines.
- The gateway builds a card grouped by buyer with the part, PO and required date.
- A buyer taps Chase and the bot opens a draft email through the email integration.
Result: The channel shows who owns each late line and nobody works the same one twice.
Approval with a real audit trail
Trigger: A requisition lands in an approver queue.
- The gateway sends a card to the approver's personal chat with the value and cost centre.
- On Approve, the bot checks that the requisition is still open and the approver still has authority.
- It calls the approval wrapper with the mapped XA user.
- The card updates to show approved by, date and time.
Result: The decision in XA names the human approver and no one needs the green screen.
Quality hold ownership
Trigger: A lot status changes to hold.
- The outbox row triggers a post in the quality channel.
- A quality engineer taps Take ownership.
- The bot writes the owner into a side table and notifies production planning.
Result: Holds have a named owner within minutes instead of sitting in an email thread.
Keeping data on-prem
Teams is a Microsoft cloud service, but the IBM i and XA can stay entirely inside your network. Run the gateway on an internal server that makes outbound HTTPS calls to Microsoft and exposes only the bot endpoint through a reverse proxy, or use an outbound-only pattern such as workflows polling an internal queue. Card content leaves your network for Microsoft, so keep it to identifiers and summaries. If a Teams assistant answers free-form questions, run the language model on your own GPU hardware and only the final text answer goes to the chat.
Security checklist
- Restrict the app to your tenant and use Entra Conditional Access so approvals respect MFA and device rules.
- Never let the bot run arbitrary SQL. Expose a fixed set of views and stored procedures.
- Authorise at action time, not at send time. A card sent hours ago must be re-checked when clicked.
- Keep secrets and the IBM i service profile in a vault, with a profile that can only call the intended objects.
- Log the card ID, Entra user, XA user, and result for every action.
Ways to get it done
Power Automate with a simple outbox feed
Effort: A few days once the outbox exists.
One-way alerts to channels and no complicated approvals.
Custom Teams bot built in-house
Effort: Several weeks including the identity map and review.
You want approvals, assignment and read queries, and have a Microsoft-skilled developer.
Netray plus an XA integration partner
Effort: A scoped pilot over a few weeks, extended by workflow.
You want approvals and an Ask-XA assistant running on a private model.
Pitfalls
- !Posting every XA exception to one channel creates noise that people mute within a week. Route by role and threshold.
- !Stale cards: an approval clicked after the requisition was changed must fail cleanly.
- !Entra and XA user lists drift as people join and leave. Review the mapping table as part of offboarding.
- !Personal-chat bot messages require the user to have installed or been assigned the app first.
- !Triggers that do heavy work inside the XA transaction can slow green screen entry. Write a lightweight outbox row and do the rest elsewhere.
Frequently asked questions
Can Teams approve a purchase order in XA directly?
Yes, through a bot or workflow that calls a controlled program on the IBM i after mapping the Entra user to an XA user. It should not update files directly, because the approval logic and audit fields live in the programs.
Does XA need to be on a particular release?
Not for the pattern here. Reading Db2 for i views, triggers and calling stored procedures work on any supported IBM i. Whether a native XA event or API layer is available depends on your release and licence, so confirm it with Infor or your partner.
Do we need Power Automate or a full bot?
Power Automate is enough for one-way alerts. Choose a bot when you need button actions that call back into XA, identity checks and conversational queries.
Can the Teams assistant answer questions about inventory?
Yes, using read-only views and showing the underlying query. For sensitive data, host the model on-prem so the question text and data are not sent to a public AI service.
What does it take to keep this running?
A small service, a secret store, monitoring on the outbox backlog, and a periodic review of identity mappings. Most of the ongoing effort is deciding which alerts are worth sending.
Want Microsoft Teams working on your Infor XA (on IBM i)?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment