Connectors

Azure Service Bus Connector

Send and receive messages between SAP and Azure Service Bus – queues, topics and subscriptions – with full enterprise messaging semantics including dead-lettering, sessions, scheduled delivery, and duplicate detection.

Overview

Azure Service Bus is Microsoft's fully managed enterprise message broker. It provides reliable, ordered, at-least-once message delivery with advanced features like message sessions (ordered per-entity delivery), scheduled messages, message deferral, and dead-lettering for poison messages.

The ASAPIO Azure Service Bus connector supports:

Prerequisites

Configuration Parameters

ParameterRequiredDefaultDescription
Namespace FQDNrequiredFully qualified namespace name, e.g. mycompany.servicebus.windows.net
Queue / Topic NamerequiredName of the queue or topic to publish to / receive from
Subscription NameoptionalFor inbound from a topic subscription. Leave blank for queue or topic publish.
Authentication MethodrequiredOAuthOne of: SAS, OAuth, ManagedIdentity
SAS Connection StringconditionalRequired if Authentication Method = SAS. Stored in SAP Secure Storage.
Client IDconditionalAzure AD app Client ID. Required if Authentication Method = OAuth.
Tenant IDconditionalAzure AD Tenant ID. Required if Authentication Method = OAuth.
Client SecretconditionalAzure AD app secret. Required if Authentication Method = OAuth. Stored in SAP Secure Storage.
ProtocoloptionalAMQPTransport protocol: AMQP (port 5671) or HTTPS (port 443)
Message FormatoptionalCloudEvents JSONMessage envelope format: CloudEvents JSON, Raw JSON, or XML
Max Retry Attemptsoptional3Number of delivery retries before placing in Dead Letter Queue
Retry Delay (sec)optional30Initial retry delay in seconds (doubles on each retry – exponential backoff)
Enable Dead Letter QueueoptionaltrueWhether to place undeliverable messages in the Azure Service Bus DLQ
Message TTL (seconds)optional86400Time-to-live for messages in Azure Service Bus (default: 24 hours)
Polling Interval (sec)optional30For inbound only: how often ASAPIO polls for new messages
Inbound Batch Sizeoptional10For inbound only: max messages to receive per polling cycle

Step-by-Step Setup

Create an Azure Service Bus namespace

In the Azure portal, search for Service Bus and click Create. Choose a resource group, name the namespace (must be globally unique), select the Standard or Premium tier, and click Review + Create.

Create a queue or topic

In your namespace, click Queues (for point-to-point) or Topics (for publish/subscribe). Click + Queue or + Topic. Configure the name and optional settings (message TTL, lock duration, dead-lettering options). Click Create.

Set up authentication

For OAuth 2.0 (recommended): In Azure AD, go to App registrations → New registration. Note the Client ID and Tenant ID. Create a client secret under Certificates & secrets. Assign the app the Azure Service Bus Data Sender role on your namespace (IAM tab).

For SAS: In your namespace, go to Shared access policies, create a policy with Send and/or Listen claims, and copy the primary connection string.

Configure in ASAPIO Event Studio

Open transaction /ASAPIO/DESIGNER. Open or create a flow. Drag the Azure Service Bus connector onto the canvas. In the properties panel, enter the Namespace FQDN, Queue/Topic Name, select OAuth as the authentication method, and enter Client ID, Tenant ID, and Client Secret. Click Test Connection to validate.

Test and activate

Use Event Studio's Test Run feature to send a sample event. Verify the message arrives in the Azure Service Bus explorer (Azure portal). Once verified, click Activate.

Outbound Example (SAP → Azure Service Bus)

Scenario: SAP S/4HANA fires a material goods movement event (transaction MIGO, movement type 101) → ASAPIO publishes a CloudEvent to Azure Service Bus topic sap-mm-events → an Azure Logic App subscribes and updates an external WMS.

The message published to Azure Service Bus looks like this:

{
  "specversion": "1.0",
  "id": "a8f3c2d1-4e5b-6f7a-8b9c-0d1e2f3a4b5c",
  "source": "urn:asapio:sap:s4hana:PRD:100",
  "type": "com.asapio.sap.s4hana.mm.goodsmovement.v1",
  "time": "2026-03-27T09:14:02Z",
  "datacontenttype": "application/json",
  "asapio-system-id": "PRD",
  "asapio-client": "100",
  "asapio-flow-id": "MM_GOODS_OUT_ASB",
  "data": {
    "materialDocument": "5000012345",
    "fiscalYear": "2026",
    "postingDate": "2026-03-27",
    "documentDate": "2026-03-27",
    "plant": "1000",
    "storageLocation": "0001",
    "items": [
      {
        "lineItem": "0001",
        "material": "MAT-001234",
        "materialDescription": "Hydraulic Pump Assembly",
        "quantity": 50.0,
        "unit": "PC",
        "movementType": "101",
        "purchaseOrder": "4500012345",
        "poItem": "10",
        "batch": "B2026001"
      }
    ]
  }
}

Inbound Example (Azure Service Bus → SAP)

Scenario: An external supplier portal posts a delivery confirmation to Azure Service Bus queue delivery-confirmations → ASAPIO polls the queue every 30 seconds → creates a Goods Receipt (MIGO) in SAP MM.

Configure the inbound flow in Event Studio:

Message Format

By default, all messages use CloudEvents 1.0 JSON format. The CloudEvents attributes are set as Azure Service Bus Application Properties (message metadata), and the data field is the message body. This allows Azure downstream consumers to filter by event type using Service Bus subscription filters without parsing the JSON body.

To disable CloudEvents and send raw JSON, set Message Format = Raw JSON in the connector configuration. In this mode, the entire mapping output is sent as the message body with no envelope.

Troubleshooting

Error MessageLikely CauseResolution
"AMQP connection refused" or timeout Firewall blocks port 5671 from SAP to Azure Open outbound TCP 5671 from SAP application server to *.servicebus.windows.net. Alternatively, switch Protocol to HTTPS (port 443).
"SAS token expired" SAP system clock not synchronized SAS tokens are time-limited. Ensure the SAP server clock is synchronized via NTP. The clock drift tolerance is 5 minutes. Consider switching to OAuth (tokens auto-refresh).
"Message size exceeds limit" Azure Service Bus Standard tier max message size is 256 KB Reduce message payload size (remove unnecessary fields in the mapper). Or upgrade to Premium tier (max 100 MB per message). Alternatively, store the payload in Azure Blob Storage and send only a reference in the message.
"Unauthorized – 401" OAuth credentials incorrect or role not assigned Verify Client ID, Tenant ID, and Client Secret in the connector config. Confirm the Azure AD app has the Azure Service Bus Data Sender role on the namespace (not just the queue/topic).
"Queue/Topic not found – 404" Queue or topic name misspelled, or wrong namespace Double-check the queue/topic name (case-sensitive). Verify the Namespace FQDN is correct. Confirm the entity exists in the Azure portal.