Microsoft TeamsSAP Business One Agent view

How to add Microsoft Teams to SAP Business One

Short answer

Build a Teams bot or Power Automate flow that reads Business One through the Service Layer, posts adaptive cards for approvals and exceptions, and writes the decision back through a controlled endpoint. Map Entra ID users to B1 users so actions run under the right identity.

A lot of Business One shops run Microsoft 365 for everything except the ERP. Approvals sit in the B1 approval inbox that people open once a day, while purchasing and sales managers live in Teams all day. The result is documents waiting on a decision nobody saw.

Teams is a good place to surface three things from B1: pending approvals, exceptions that need a human (a blocked order, a negative stock warning, a late purchase order), and quick lookups. The Service Layer provides enough to do all three without touching the database.

The main design question is identity. A bot that acts with one shared integration login hides who approved what. This page covers how to keep the person visible, and what changes when B1 is on-prem behind a firewall.

What teams use it for

Purchase approval cards

Post an adaptive card to the approver when a Purchase Order or Draft hits an Approval Procedure, with vendor, total and requester, and Approve or Reject buttons.

Credit-hold alerts

Notify the credit controller channel when a Sales Order is blocked by credit limit, with customer balance and the order value.

Low stock to channel

Post a daily summary of items below minimum stock per warehouse to the planning channel, from a saved query run through the Service Layer.

Production issue triage

Post when a Production Order is late or a component issue shows a negative on-hand risk, tagging the planner.

Ask-the-ERP in a chat

A bot command like 'status SO 10482' returns the order state, delivery status and invoice link.

SAP Business One integration surface

  • Service Layer for reading Orders, PurchaseOrders, Drafts, StockTransfers, ProductionOrders and Items, and for patching approved fields or adding Activities.
  • Approval data: the approval procedure tables (such as OWDD for approval requests) hold pending requests; whether you read them via the Service Layer entities or a query depends on version, so verify in your release.
  • Saved queries (User Queries from Query Manager) can be called through the Service Layer, which lets a business user own the SQL behind a Teams summary.
  • Alerts Management in B1 can send internal messages and, in some setups, email, which a flow can pick up if you prefer a mailbox trigger over polling.
  • Entra ID (Azure AD) on the Microsoft side, with a mapping table from user principal name to the B1 user code, kept in a UDT.

How it works

  1. 1

    Pick the Teams surface

    Choose between a Power Automate flow (fast, low-code), a Teams bot built with the Bot Framework or the Teams SDK (more control), or incoming webhooks for one-way alerts.

  2. 2

    Register the app in Entra ID

    Create an app registration, define the bot or message extension, and scope permissions to the minimum needed to post and read the user's identity.

  3. 3

    Connect to the Service Layer

    Run the backend where it can reach the B1 server. Log in with an integration user, cache the session, and handle expiry and re-login.

  4. 4

    Map identities

    Keep a table linking Entra user to B1 user code and approval role. Reject card actions from anyone not mapped.

  5. 5

    Render and send adaptive cards

    Build cards from document data, include the document key in the action payload, and update the card in place after the decision so it cannot be clicked twice.

  6. 6

    Execute the decision

    On Approve, call the approval endpoint if your version exposes one, or otherwise record the decision and let a user finalize in B1. Verify the document status before acting to catch stale cards.

  7. 7

    Audit

    Log card ID, approver, decision time and the B1 document in a UDT or log store.

Example flows

PO approval in Teams

Trigger: A Purchase Order draft above the buyer's limit enters the approval queue.

  1. A poll finds the new pending request and loads vendor and totals.
  2. The bot posts an adaptive card to the approver's chat.
  3. Approver taps Approve; the backend checks the request is still pending.
  4. The decision is submitted and the card updates to show who approved and when.

Result: Approvals resolve in minutes rather than waiting for the next time someone opens B1.

Morning stock exception digest

Trigger: A scheduler at 07:30 runs a saved query for items below minimum by warehouse.

  1. Call the saved query through the Service Layer.
  2. Group results by planner using an item group or UDF.
  3. Post one card per planner with item, on-hand, committed and open PO quantity.
  4. A 'Create PO draft' button creates a draft the planner reviews in B1.

Result: Planners start the day with the exceptions, and no PO is created without review.

Keeping data on-prem

With B1 on-prem, the Teams service in Microsoft's cloud cannot reach your Service Layer directly, and you should not open it to the internet. Two clean patterns work. First, run the bot backend inside your network and have it connect outbound to Teams, so nothing inbound is needed to B1. Second, if the bot must run in Azure, connect it through a VPN or private link and a reverse proxy that exposes only specific endpoints. Card content is stored by Microsoft, so keep it to document numbers, statuses and totals. If you add AI summarization of exceptions, run it on a local open-weight model on your own server and send only the finished text to the card.

Security checklist

  • Use Entra ID sign-in and tenant restriction so only your tenant's users can act on cards.
  • Never trust the card payload alone: re-read the document from B1 and re-check approver authority before writing.
  • Give the integration user the least B1 authorizations needed and keep it separate from human users.
  • Restrict who can add the bot to channels, since channel members may see document data.

Ways to get it done

Power Automate with HTTP actions

Effort: A few days per flow; the on-prem reach usually needs a gateway or tunnel.

Best for alerts and simple approvals when licences are already in place and the volume is modest.

Custom Teams bot over the Service Layer

Effort: Three to six weeks for approvals plus lookups.

Best when you need identity mapping, in-place card updates and chat commands.

Partner-built bot with AI Q&A (Netray with a B1 partner)

Effort: Scoped project over several weeks; reads first, writes later.

Fits when you want natural-language lookups over B1 data on a private model with approval gates.

Pitfalls

  • !Posting everything to one channel: people mute it. Route by role and exception type.
  • !Cards left active after a decision in B1 produce conflicting actions; always update or disable the card.
  • !Using one shared login hides the real approver and may breach your internal control policy.
  • !Assuming approval entities are identical across versions; test on your release before promising write-back.

Frequently asked questions

Can approvers approve B1 documents from Teams?

Often yes, but how depends on your version and what the Service Layer exposes for approval requests. Where it does not, the card records the decision and a user finalizes in B1. Always test on your own build.

Do I need Power Automate?

No. It is a quick way to start, but a custom bot gives better identity handling and card updates. Power Automate premium connectors and HTTP actions carry licence costs to check.

Is Teams integration possible with on-prem B1?

Yes. Run the backend inside your network and connect outbound, or use a VPN and reverse proxy. Do not publish the Service Layer to the internet.

Can I get alerts without writing code?

For one-way alerts, B1 Alerts Management emailing a shared mailbox plus a Teams channel email address or a mailbox-triggered flow can work with little code, though without interactive buttons.

Can the Teams bot answer free-form questions?

It can, if you add a retrieval or query layer over B1 data. Keep it read-only at first and show the underlying query or document links so answers can be checked.

Want Microsoft Teams working on your SAP Business One?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment