
EDI and B2B Integration Using Azure Logic Apps: AS2, X12, and EDIFACT
Apr 1, 2025
If you’ve worked in supply chain, retail, logistics, or finance, chances are you’ve met EDI — the ancient-yet-surprisingly-alive method of exchanging structured business documents between organizations. Standards like X12, EDIFACT, and protocols like AS2 are still widely used for invoices, purchase orders, shipment notices, and partner onboarding. Traditionally handled by expensive B2B gateways or dinosaur-grade on-prem servers, EDI integration is now fully possible using Azure Logic Apps’ B2B capabilities. In this article, we’ll explore how to handle EDI and B2B integrations in Azure using Logic Apps, Integration Accounts, and AS2 connectors, all while keeping things secure, auditable, and (mostly) human-friendly.
Let’s start with the foundation: Integration Accounts. These special Azure resources store all the metadata you need for B2B transactions — partners, agreements, schemas, maps (transformations), certificates, and more. They plug into Logic Apps and allow you to create EDI-aware workflows. For example, you can create a Logic App that receives an X12 850 (Purchase Order) over AS2, transforms it to JSON, enriches it, and sends it to Dynamics 365. Or you can send an outbound EDIFACT invoice by transforming your internal format into EDIFACT and wrapping it in an AS2 message. The magic is in the configuration, not custom code.
To exchange messages securely with partners, Azure supports the AS2 protocol — the backbone of EDI document transport. It ensures non-repudiation, integrity, encryption, and synchronous or asynchronous acknowledgments (MDNs). Azure handles all the heavy lifting: certificate exchange, payload signing, retries, and acknowledgments. You configure your partners (trading entities) with their AS2 identifiers, certificate fingerprints, and endpoint URLs. Then you define agreements between your organization and theirs, specifying message types (e.g., 850, 810), expected formats, and protocols. Logic Apps then use the AS2 Receive or AS2 Send triggers/actions to securely handle messages.
The next piece is mapping and transformation. EDI documents are notoriously ugly to read, so Azure helps you make sense of them. You can upload X12/EDIFACT schemas into your Integration Account and use maps (XSLT) to convert between formats — for example, from X12 850 to your internal JSON structure, or vice versa. Logic Apps can reference these maps using the “Transform XML” action. For more flexibility, you can combine these with Liquid templates or Azure Functions to add conditional logic, enrich messages, or even translate between different partner-specific variants. This is where Azure shines — you don’t need to maintain a separate BizTalk server just to convert one PO format to another.
On the monitoring and operations side, Azure provides built-in tracking and troubleshooting tools. All B2B messages processed by Logic Apps and Integration Accounts are logged — including payloads, MDNs, transformations, and errors. You can view transaction statuses, raw messages, and acknowledgments in the Azure Portal or query them via Log Analytics. Set up alerts for failed messages, missing acknowledgments, or invalid formats. You can even correlate transactions using interchange control numbers and custom correlation IDs. When onboarding new partners, you can set up test environments and enable verbose logging to quickly diagnose issues with format, connectivity, or certificates. Goodbye, EDI black boxes!
Let’s talk scalability and compliance. Logic Apps with B2B support scale out automatically to handle high volumes of transactions — whether you’re processing hundreds or millions per day. Use Service Bus or Event Grid to queue or route messages for downstream systems, keeping workflows decoupled. For compliance, Azure encrypts data at rest and in transit, supports private endpoints, managed identities, and role-based access control, and logs every interaction for auditing. Need to retain EDI messages for 7 years for SOX compliance? Push them to Azure Blob Storage with lifecycle management and retention policies. Azure’s B2B stack checks all the boxes — without the hardware, licensing, or midnight patch cycles of old-school systems.
In conclusion: EDI isn’t dead — but your old infrastructure should be. With Azure Logic Apps, Integration Accounts, and AS2 support, you can modernize your B2B workflows, onboard partners faster, and manage integrations with the same cloud-native mindset you apply everywhere else. No more BizTalk dependencies, FTP folders, or XML gymnastics. Just clean, secure, scalable EDI in the cloud.