Try for free Book a demo

Connecting Logic Apps with Azure Integration Account

Microsoft Azure

5 Mins Read | Last modified on July 25th, 2024

Connecting-Logic-Apps

What is Azure Integration Account?

The Integration Account is part of the Logic Apps Enterprise Integration Pack (EIP) and is a secure, manageable and scalable container for the integration artifacts that we create. We can store maps, schemas, partners, agreements and certificates in our Integration Account once and reference them across all our logic apps making the creation of B2B processes with logic apps quick and easy.

Why should we use Enterprise Integration Pack?

  • we are able to store all our artifacts in one place, which is our integration account.
  • we can leverage the Logic Apps engine and all its connectors to build B2B workflows and integrate with 3rd party SaaS applications, on-premises apps as well as custom applications
  • we can also leverage Azure functions

In this blog, we will discuss how we can connect Azure Logic Apps with an Integration Account.

Use Case Scenario

Let’s assume organizations want to exchange messages electronically, even if they use different protocols and formats. the Enterprise Integration Pack enables you to transform different formats into a format that organizations’ systems can interpret and process. Organizations can exchange messages through industry-standard protocols, including AS2, X12, and EDIFACT. You can also secure messages with both encryption and digital signatures.

If you are familiar with BizTalk Server or Microsoft Azure BizTalk Services, the Enterprise Integration features are easy to use because most concepts are similar. One major difference is that Enterprise Integration Pack uses Integration Accounts to simplify the storage and management of artifacts used in B2B communications.

Use-case-Scenario

Create an Azure Integration Account

In Azure Portal, and Click “+NEW” and choose “Enterprise Integration”. Select “Integration Account”.

Enterprise-Integration-in-Azure-Marketplace

In the Create Integration Account blade, enter the Name for our Integration Account, select the Subscription we want to use; either create a new Resource group or select an existing Resource Group, select a Location where our Integration Account will be hosted, select a Pricing tier, then click the Create button.

Integration-Account-Creation

The process usually takes within 1 minute. Once the template has been provisioned, we will see a notification and the new instances and related resources will appear in the “Resource groups” section of the Microsoft Azure management console.

New-Integration-Account

Add Maps

Integration Account uses maps to transform XML data between formats. A map is an XML document that defines the data in a document that should be transformed into another format.

Select the Maps tile.

Add-Maps

After the Maps blade opens, choose Add. Next, Enter a Name for our map. To upload the map file, choose the folder icon on the right side of the Map text box. After the upload process completes, choose OK.

Adding-Map

Add a schema file smaller than 2 MB

In the Schemas blade that opens (from the preceding steps), choose Add.

Add-Schema-in-Intergration-Account

Enter a Name for our schema. Upload the schema file by selecting the folder icon next to the Schema box. After the upload process completes, select OK.

Adding-Schema

What is Integration Account in Logic Apps?

Integration Account is a part of the Azure Logic Apps Enterprise Integration Pack (EIP) that is a secure, manageable, and scalable container for the integration artifacts that are created. With Enterprise Integration, we can: Store all the related artifacts in one place, which is logically called the Integration Account

How to link an integration account to a Logic app

Note: We must ensure our Integration Account and Logic app are in the same Azure location.

Select the Integration Account under Setting from our Logic app, we wish to link to our Logic App from the Select an Integration Account drop-down list box and click Save Button.

Add-Integration-Account-with-Logic-Apps

We will see a notification that indicates that our Integration Account has been linked to our Logic app and that all artifacts in our Integration Account are now available to our Logic App.

Notification

Adding XML Validation

  • Add a Request – When an HTTP request is received trigger our Logic App
  • Add the XML Validation action, choose Add an action
  • To filter all the actions to the one that we want, enter “xml” in the search box. Choose XML Validation
  • To specify the XML content that we want to validate, select CONTENT.
  • Select the body tag as the content that we want to validate.

Adding Transform XML

  • Add the Transform XML action by first selecting Add an action
  • Enter the word “transform” in the search box to filter all the actions to the one that we want to use
  • Select the Transform XML action
  • Add the XML CONTENT that you transform. We can use any XML data you receive in the HTTP request as the CONTENT. In this example, select the body of the HTTP request that triggered the Logic app
  • Select the name of the Map that you want to use to perform the transformation. The map must already be in our Integration Account. In an earlier step, we already gave our Logic App access to our Integration Account that contains our map

Adding Condition

Conditions are used to perform the action on which we add the condition when the condition matches the requirements.

Choose New Step (+) > Add an Condition.

@equals(xpath(xml(body(‘Transform_XML’)), ‘string(count(/.))’), ‘1’).

Once the Logic App is configured, it should look as shown below.

Logic-App-Working-Flow

Run the Logic App

To test the Logic App, we will use Postman to send a request (POST) with a payload.

  • Set content-type header to application/xml.
  • Set request body to the content of sample-order.xml.

On successful execution, the Logic App will respond with the transformed message (a SAP order) in response body.

Logic-App-Output

Conclusion

Integration Account stores all our artifacts in one place and references them across all our Logic Apps, making the creation of B2B processes with Logic Apps quick and easy. This is great for ROI because previously created BizTalk artifacts like schemas and maps can be re-used.

This article was originally published on Feb 27, 2017. It was most recently updated on Jul 25, 2024.

Azure Logic Apps - Request Demo CTA

Related Articles